Commit a41a7ea6 by Masudur Rahman Committed by Torkel Ödegaard

Backend: Remove redundant condition of `ROLE_VIEWER` (#19211)

parent 14f1cf29
...@@ -36,11 +36,7 @@ func (r RoleType) Includes(other RoleType) bool { ...@@ -36,11 +36,7 @@ func (r RoleType) Includes(other RoleType) bool {
return other != ROLE_ADMIN return other != ROLE_ADMIN
} }
if r == ROLE_VIEWER { return r == other
return other == ROLE_VIEWER
}
return false
} }
func (r *RoleType) UnmarshalJSON(data []byte) error { func (r *RoleType) UnmarshalJSON(data []byte) error {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment