add new db handler with table change to reference many2many

This commit is contained in:
Adrian Zürcher
2025-11-19 16:29:37 +01:00
parent 567cc726cc
commit 2736aa1f6b
9 changed files with 103 additions and 130 deletions

View File

@@ -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})