Browse Source

Merge branch 'patch-1' of https://github.com/sairam0903/grafana into sairam0903-patch-1

Torkel Ödegaard 6 năm trước cách đây
mục cha
commit
fd4ee6b032
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      pkg/models/org_user.go

+ 4 - 0
pkg/models/org_user.go

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