mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix: fixed permission issue with api key with viewer role in dashboards with default permissions
This commit is contained in:
@@ -162,6 +162,11 @@ func TestGuardianViewer(t *testing.T) {
|
||||
sc.parentFolderPermissionScenario(VIEWER, m.PERMISSION_EDIT, EDITOR_ACCESS)
|
||||
sc.parentFolderPermissionScenario(VIEWER, m.PERMISSION_VIEW, VIEWER_ACCESS)
|
||||
})
|
||||
|
||||
apiKeyScenario("Given api key with viewer role", t, m.ROLE_VIEWER, func(sc *scenarioContext) {
|
||||
// dashboard has default permissions
|
||||
sc.defaultPermissionScenario(VIEWER, m.PERMISSION_EDIT, VIEWER_ACCESS)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -267,7 +272,7 @@ func (sc *scenarioContext) verifyExpectedPermissionsFlags() {
|
||||
actualFlag = NO_ACCESS
|
||||
}
|
||||
|
||||
if sc.expectedFlags&actualFlag != sc.expectedFlags {
|
||||
if actualFlag&sc.expectedFlags != actualFlag {
|
||||
sc.reportFailure(tc, sc.expectedFlags.String(), actualFlag.String())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user