Roles and permissions view completed

This commit is contained in:
cdricms
2025-01-31 12:09:08 +01:00
parent 0e707e8721
commit acfd2c7b14
5 changed files with 119 additions and 99 deletions

View File

@@ -34,17 +34,14 @@ func HandleResourceActions(w http.ResponseWriter, r *http.Request) {
return
}
result := make([]map[string]interface{}, 0)
result := make(map[string]interface{}, 0)
for _, gp := range groupedPermissions {
var actions []string
_ = gp.Actions.AssignTo(&actions)
result = append(result, map[string]interface{}{
"resource": gp.Resource,
"actions": actions,
})
result[gp.Resource] = actions
}
core.JSONSuccess{