mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-03-21 12:29:03 +01:00
(security) access to admin/store is restricted to admins & managers
also, access to admin/store/settings is not allowed to managers
This commit is contained in:
parent
8dd4463a14
commit
794f6130d2
@ -353,6 +353,7 @@ Application.Controllers.controller('ApplicationController', ['$rootScope', '$sco
|
||||
if (AuthService.isAuthenticated()) {
|
||||
// user is not allowed
|
||||
console.error('[ApplicationController::initialize] user is not allowed');
|
||||
return false;
|
||||
} else {
|
||||
// user is not logged in
|
||||
openLoginModal(trans.$to().name, trans.$to().params);
|
||||
|
@ -1195,6 +1195,9 @@ angular.module('application.router', ['ui.router'])
|
||||
.state('app.admin.store.settings', {
|
||||
url: '/settings',
|
||||
abstract: !Fablab.storeModule,
|
||||
data: {
|
||||
authorizedRoles: ['admin']
|
||||
},
|
||||
views: {
|
||||
'main@': {
|
||||
templateUrl: '/admin/store/index.html',
|
||||
|
@ -14,7 +14,7 @@
|
||||
<div>
|
||||
<uib-tabset justified="true" active="tabs.active">
|
||||
|
||||
<uib-tab heading="{{ 'app.admin.store.settings' | translate }}" index="0" select="selectTab()">
|
||||
<uib-tab heading="{{ 'app.admin.store.settings' | translate }}" index="0" select="selectTab()" ng-hide="currentUser.role == 'manager'">
|
||||
<ng-include src="'/admin/store/settings.html'"></ng-include>
|
||||
</uib-tab>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user