Skip to content

Commit

Permalink
Backend: Remove redundant condition of ROLE_VIEWER (#19211)
Browse files Browse the repository at this point in the history
  • Loading branch information
masudur-rahman authored and torkelo committed Sep 19, 2019
1 parent 14f1cf2 commit a41a7ea
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions pkg/models/org_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,7 @@ func (r RoleType) Includes(other RoleType) bool {
return other != ROLE_ADMIN
}

if r == ROLE_VIEWER {
return other == ROLE_VIEWER
}

return false
return r == other
}

func (r *RoleType) UnmarshalJSON(data []byte) error {
Expand Down

0 comments on commit a41a7ea

Please sign in to comment.