mirror of
https://github.com/documize/community.git
synced 2025-08-05 13:35:25 +02:00
Replace permission related strings with typed values
This commit is contained in:
parent
99f0a16d71
commit
08f0c2cd0b
8 changed files with 72 additions and 58 deletions
|
@ -82,10 +82,10 @@ func (h *Handler) Add(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
perm := pm.Permission{}
|
||||
perm.OrgID = ctx.OrgID
|
||||
perm.Who = "user"
|
||||
perm.Who = pm.UserPermission
|
||||
perm.WhoID = ctx.UserID
|
||||
perm.Scope = "object"
|
||||
perm.Location = "category"
|
||||
perm.Scope = pm.ScopeRow
|
||||
perm.Location = pm.LocationCategory
|
||||
perm.RefID = cat.RefID
|
||||
perm.Action = pm.CategoryView
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue