Skip to content

Commit

Permalink
update permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
tcaiger committed Nov 8, 2024
1 parent 401cc30 commit dfeb802
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { CreateHandler } from '../CreateHandler';
import {
assertAnyPermissions,
assertBESAdminAccess,
assertAdminPanelAccess,
assertPermissionGroupsAccess,
assertVizBuilderAccess,
} from '../../permissions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { EditHandler } from '../EditHandler';
import {
assertAnyPermissions,
assertBESAdminAccess,
assertAdminPanelAccess,
assertPermissionGroupAccess,
assertVizBuilderAccess,
} from '../../permissions';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import { CreateHandler } from '../CreateHandler';
import {
assertBESAdminAccess,
assertAnyPermissions,
assertAdminPanelAccess,
assertPermissionGroupsAccess,
assertVizBuilderAccess,
} from '../../permissions';
import { constructNewRecordValidationRules } from '../utilities';

Expand All @@ -23,8 +23,8 @@ export class CreateMapOverlayVisualisation extends CreateHandler {
async assertUserHasAccess() {
await this.assertPermissions(
assertAnyPermissions(
[assertBESAdminAccess, assertAdminPanelAccess],
'You require Tupaia Admin Panel or BES Admin permission to create visualisations.',
[assertBESAdminAccess, assertVizBuilderAccess],
'You require Viz Builder User or BES Admin permission to create visualisations.',
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { EditHandler } from '../EditHandler';
import {
assertBESAdminAccess,
assertAnyPermissions,
assertAdminPanelAccess,
assertPermissionGroupsAccess,
assertVizBuilderAccess,
} from '../../permissions';

const isFieldUpdated = (oldObject, newObject, fieldName) =>
Expand All @@ -32,8 +32,8 @@ export class EditMapOverlayVisualisation extends EditHandler {
async assertUserHasAccess() {
await this.assertPermissions(
assertAnyPermissions(
[assertBESAdminAccess, assertAdminPanelAccess],
'You require Tupaia Admin Panel or BES Admin permission to create visualisations.',
[assertBESAdminAccess, assertVizBuilderAccess],
'You require Viz Builder User or BES Admin permission to create visualisations.',
),
);
}
Expand Down Expand Up @@ -89,8 +89,8 @@ export class EditMapOverlayVisualisation extends EditHandler {
async editRecord() {
await this.assertPermissions(
assertAnyPermissions(
[assertBESAdminAccess, assertAdminPanelAccess],
'You require Viz Builder User or BES Admin permission to create visualisations.',
[assertBESAdminAccess, assertVizBuilderAccess],
'You require Viz Builder User or BES Admin permission to edit visualisations.',
),
);

Expand Down

0 comments on commit dfeb802

Please sign in to comment.