Update org_user.go

Add check for, if current role is ROLE_VIEWER, return true if the role I'm checking for is ROLE_VIEWER. Fixes #16092
This commit is contained in:
Sai Ram Gupta 2019-03-19 11:31:55 -07:00 committed by GitHub
parent f69f0c2c31
commit 6929593eb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,6 +36,10 @@ func (r RoleType) Includes(other RoleType) bool {
return other != ROLE_ADMIN return other != ROLE_ADMIN
} }
if r == ROLE_VIEWER {
return other == ROLE_VIEWER
}
return false return false
} }