add new db handler with table change to reference many2many
This commit is contained in:
@@ -132,7 +132,7 @@ func (aH *AccessHandler) AuthorizeRole(suffix string, exeptions ...string) gin.H
|
||||
|
||||
// Fetch roles and associated permissions from the database or store
|
||||
var roles []models.Role
|
||||
err := aH.dbHandler.GetByKey(&roles, "role", role, false)
|
||||
err := aH.dbHandler.GetByKey(&roles, "", "role", role, false)
|
||||
if err != nil {
|
||||
aH.logger.Error("AuthorizeRole", err)
|
||||
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"message": http.StatusInternalServerError})
|
||||
|
||||
Reference in New Issue
Block a user