瀏覽代碼

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

Torkel Ödegaard 6 年之前
父節點
當前提交
fd4ee6b032
共有 1 個文件被更改,包括 4 次插入0 次删除
  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
 }