diff options
Diffstat (limited to 'models/perm/access_mode.go')
-rw-r--r-- | models/perm/access_mode.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/models/perm/access_mode.go b/models/perm/access_mode.go index f2c0a322a0..dfa7f7b752 100644 --- a/models/perm/access_mode.go +++ b/models/perm/access_mode.go @@ -51,11 +51,13 @@ func (mode AccessMode) ColorFormat(s fmt.State) { // ParseAccessMode returns corresponding access mode to given permission string. func ParseAccessMode(permission string) AccessMode { switch permission { + case "read": + return AccessModeRead case "write": return AccessModeWrite case "admin": return AccessModeAdmin default: - return AccessModeRead + return AccessModeNone } } |