1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

Fix space permissions group vs. user role overriding

This commit is contained in:
sauls8t 2018-03-27 11:33:43 +01:00
parent e1d2d4c037
commit ad4030bc17
11 changed files with 691 additions and 680 deletions

View file

@ -15,6 +15,7 @@ package permission
// This data structure is made from database permission records for the space,
// and it is designed to be sent to HTTP clients (web, mobile).
type Record struct {
ID uint64 `json:"id"`
OrgID string `json:"orgId"`
SpaceID string `json:"folderId"`
WhoID string `json:"whoId"`
@ -40,6 +41,7 @@ func DecodeUserPermissions(perm []Permission) (r Record) {
r = Record{}
if len(perm) > 0 {
r.ID = perm[0].ID
r.OrgID = perm[0].OrgID
r.WhoID = perm[0].WhoID
r.Who = perm[0].Who