acl in routes
This commit is contained in:
parent
865d106d4f
commit
c74bafae7e
|
@ -7,7 +7,8 @@
|
|||
{
|
||||
"url": "/clients",
|
||||
"state": "clients",
|
||||
"component": "vn-client-index"
|
||||
"component": "vn-client-index",
|
||||
"acl": ["employee"]
|
||||
}, {
|
||||
"url": "/create",
|
||||
"state": "create",
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
{
|
||||
"url": "/locator",
|
||||
"state": "locator",
|
||||
"component": "vn-locator-index"
|
||||
"component": "vn-locator-index",
|
||||
"acl": ["developer"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -7,7 +7,8 @@
|
|||
{
|
||||
"url": "/production",
|
||||
"state": "production",
|
||||
"component": "vn-production-index"
|
||||
"component": "vn-production-index",
|
||||
"acl": ["employee"]
|
||||
}
|
||||
]
|
||||
}
|
|
@ -4,7 +4,7 @@ export class ProductionTable {
|
|||
constructor($filter) {
|
||||
this.$filter = $filter;
|
||||
this._tickets = [];
|
||||
this.itemsDisplayedInList = 16;
|
||||
this.itemsDisplayedInList = 14;
|
||||
this._checkAll = 0;
|
||||
this.pageTable = {
|
||||
filter: {
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"url": "/list",
|
||||
"state": "routes.index",
|
||||
"component": "vn-route-index",
|
||||
"acl": ["employee"]
|
||||
"acl": ["developer"]
|
||||
},
|
||||
{
|
||||
"url": "/create",
|
||||
|
@ -43,6 +43,7 @@
|
|||
"url": "/logisticData",
|
||||
"state": "routes.card.logisticData",
|
||||
"component": "vn-route-logistic-data",
|
||||
"acl": ["employee"],
|
||||
"params": {
|
||||
"route": "$ctrl.route"
|
||||
},
|
||||
|
|
|
@ -37,10 +37,10 @@ function config($stateProvider, $urlRouterProvider, aclServiceProvider) {
|
|||
template: '<vn-home></vn-home>'
|
||||
});
|
||||
|
||||
for (let file in routes) {
|
||||
let fileRoutes = routes[file].routes;
|
||||
let moduleName = routes[file].module;
|
||||
let validations = routes[file].validations || false;
|
||||
for (let file in window.routes) {
|
||||
let fileRoutes = window.routes[file].routes;
|
||||
let moduleName = window.routes[file].module;
|
||||
let validations = window.routes[file].validations || false;
|
||||
fileRoutes.forEach(function(route) {
|
||||
if (aclService.routeHasPermission(route)) {
|
||||
$stateProvider.state(route.state, {
|
||||
|
|
Loading…
Reference in New Issue