Skip to content

Commit fa8583a

Browse files
rouxxilaura-bergoens
authored andcommitted
feat(admin): add redirection when the user isn't an admin
1 parent 3cb2c4c commit fa8583a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • admin/app/routes/authenticated/certification-frameworks/item/framework

admin/app/routes/authenticated/certification-frameworks/item/framework/new-version.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@ export default class FrameworkRoute extends Route {
88
};
99
@service store;
1010
@service router;
11+
@service accessControl;
1112

13+
beforeModel() {
14+
this.accessControl.restrictAccessTo(['isSuperAdmin'], 'authenticated.certification-frameworks.item.framework');
15+
}
1216
async model(params) {
1317
let activeVersion;
1418
const frameworks = await this.store.findAll('framework');

0 commit comments

Comments
 (0)