1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-08-05 05:25:27 +02:00

New user role: view analytics

This commit is contained in:
McMatts 2018-04-05 19:59:57 +01:00
parent b65a00dd1c
commit 19a916a4b4
13 changed files with 68 additions and 29 deletions

View file

@ -40,6 +40,7 @@ func AttachUserAccounts(ctx domain.RequestContext, s domain.Store, orgID string,
u.Admin = false
u.Active = false
u.ViewUsers = false
u.Analytics = false
for _, account := range u.Accounts {
if account.OrgID == orgID {
@ -47,6 +48,7 @@ func AttachUserAccounts(ctx domain.RequestContext, s domain.Store, orgID string,
u.Editor = account.Editor
u.Active = account.Active
u.ViewUsers = account.Users
u.Analytics = account.Analytics
break
}
}