Roles: New user role that replaces the old role behavior, Closes #2088

This commit is contained in:
Torkel Ödegaard
2015-06-01 17:01:04 +02:00
parent 86f5152092
commit ff3843bc7f
5 changed files with 11 additions and 9 deletions
+5 -4
View File
@@ -15,13 +15,14 @@ var (
type RoleType string
const (
ROLE_VIEWER RoleType = "Viewer"
ROLE_EDITOR RoleType = "Editor"
ROLE_ADMIN RoleType = "Admin"
ROLE_VIEWER RoleType = "Viewer"
ROLE_EDITOR RoleType = "Editor"
ROLE_READ_ONLY_EDITOR RoleType = "Read Only Editor"
ROLE_ADMIN RoleType = "Admin"
)
func (r RoleType) IsValid() bool {
return r == ROLE_VIEWER || r == ROLE_ADMIN || r == ROLE_EDITOR
return r == ROLE_VIEWER || r == ROLE_ADMIN || r == ROLE_EDITOR || r == ROLE_READ_ONLY_EDITOR
}
type OrgUser struct {