mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
AccessControl: Remove legacy frontend AC checks (#76187)
* remove legacy ac checks * fix RBAC disabled tests * add permissions for tests to work * fix unifiedalertstatesworker test
This commit is contained in:
@@ -3,7 +3,7 @@ import { lastValueFrom } from 'rxjs';
|
||||
import { AlertState, getDefaultTimeRange, TimeRange } from '@grafana/data';
|
||||
import { config } from '@grafana/runtime';
|
||||
import { backendSrv } from 'app/core/services/backend_srv';
|
||||
import { disableRBAC, enableRBAC, grantUserPermissions } from 'app/features/alerting/unified/mocks';
|
||||
import { grantUserPermissions } from 'app/features/alerting/unified/mocks';
|
||||
import { Annotation } from 'app/features/alerting/unified/utils/constants';
|
||||
import { createDashboardModelFixture } from 'app/features/dashboard/state/__fixtures__/dashboardFixtures';
|
||||
import { AccessControlAction } from 'app/types/accessControl';
|
||||
@@ -47,10 +47,7 @@ describe('UnifiedAlertStatesWorker', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
config.publicDashboardAccessToken = '';
|
||||
});
|
||||
|
||||
beforeAll(() => {
|
||||
disableRBAC();
|
||||
grantUserPermissions(Object.values(AccessControlAction));
|
||||
});
|
||||
|
||||
describe('when canWork is called with correct props', () => {
|
||||
@@ -231,7 +228,6 @@ describe('UnifiedAlertStatesWorker', () => {
|
||||
|
||||
describe('UnifiedAlertStateWorker with RBAC', () => {
|
||||
beforeAll(() => {
|
||||
enableRBAC();
|
||||
grantUserPermissions([]);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user