dashfolders: new admin permission needed to view/change acl

This commit is contained in:
Daniel Lee
2017-06-22 23:01:04 +02:00
parent f6b52cd6d7
commit 1d43bfbf3f
3 changed files with 66 additions and 19 deletions
+4
View File
@@ -36,6 +36,10 @@ func (g *DashboardGuardian) CanView() (bool, error) {
return g.HasPermission(m.PERMISSION_VIEW)
}
func (g *DashboardGuardian) CanAdmin() (bool, error) {
return g.HasPermission(m.PERMISSION_ADMIN)
}
func (g *DashboardGuardian) HasPermission(permission m.PermissionType) (bool, error) {
if g.user.OrgRole == m.ROLE_ADMIN {
return true, nil