Authorization casbin #1

Closed
senaduka wants to merge 4 commits from authorization_casbin into master
2 changed files with 3 additions and 3 deletions
Showing only changes of commit c43ae352a3 - Show all commits

View File

@@ -784,7 +784,7 @@ func (c *userRepo) getAddressSecondaryData(address entity.Address) (entity.Addre
// GetAll returns a list of all active cards
func (c *userRepo) GetAll() (list []entity.User, err error) {
return c.parseSet(c.conn.Query(c.getQuery() + " WHERE a.active = 1 "))
return c.parseSet(c.conn.Query(c.getQuery() + " AND a.active = 1 "))
}
// GetByID returns a single card data by its ID

View File

@@ -117,8 +117,8 @@ func (a *Config) policyObjectAttributes(c echo.Context, userDetails viewmodel.Us
objectIsNew := len(c.ParamValues()) <= 1
objectIsExisting := len(c.ParamValues()) > 1
existingUser := strings.Contains(c.Request().URL.Path, "/users") && objectIsNew
newUser := strings.Contains(c.Request().URL.Path, "/users") && objectIsExisting
existingUser := strings.Contains(c.Request().URL.Path, "/users") && objectIsExisting
newUser := strings.Contains(c.Request().URL.Path, "/users") && objectIsNew
existingOrganization := strings.Contains(c.Request().URL.Path, "/organization") && objectIsExisting
newOrganization := strings.Contains(c.Request().URL.Path, "/organization") && objectIsNew