feat(plugins): WIP on new apps concept

This commit is contained in:
Torkel Ödegaard
2015-12-21 23:09:27 +01:00
parent 0903d5541b
commit eacc46da6d
10 changed files with 141 additions and 146 deletions

View File

@@ -26,6 +26,17 @@ func (r RoleType) IsValid() bool {
return r == ROLE_VIEWER || r == ROLE_ADMIN || r == ROLE_EDITOR || r == ROLE_READ_ONLY_EDITOR
}
func (r RoleType) Includes(other RoleType) bool {
if r == ROLE_ADMIN {
return true
}
if r == ROLE_EDITOR || r == ROLE_READ_ONLY_EDITOR {
return other != ROLE_ADMIN
}
return r == other
}
type OrgUser struct {
Id int64
OrgId int64