Fixed a lot of permissions
This commit is contained in:
parent
70d31fea5e
commit
abc29844d3
48
DB/db.cmd
48
DB/db.cmd
|
@ -2,27 +2,27 @@
|
|||
"\Program Files\PostgreSQL\11\bin\createdb.exe" -U postgres petty
|
||||
..\env\Scripts\initdb.exe ..\development.ini
|
||||
..\env\Scripts\fixtures.exe ..\development.ini
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < a-Roles.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < b-Permissions.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < c-RolePermissions.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < d-Users.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < e-UserRoles.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < f-Customers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < g-FoodTables.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < h-Taxes.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < i-MenuCategories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < j-SaleCategories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < k-Products.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < l-Modifiers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < m-Sections.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < n-Printers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < o-SectionPrinters.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < p-Vouchers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < q-Kots.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < r-Inventories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < s-InventoryModifiers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < t-Overview.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < u-ProductGroupModifiers.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < v-Reprints.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < w-Settings.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < x-VoucherSettlements.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\a-Roles.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\b-Permissions.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\c-RolePermissions.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\d-Users.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\e-UserRoles.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\f-Customers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\g-FoodTables.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\h-Taxes.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\i-MenuCategories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\j-SaleCategories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\k-Products.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\l-Modifiers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\m-Sections.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\n-Printers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\o-SectionPrinters.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\p-Vouchers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\q-Kots.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\r-Inventories.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\s-InventoryModifiers.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\t-Overview.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\u-ProductGroupModifiers.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\v-Reprints.sql
|
||||
REM "\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\w-Settings.sql
|
||||
"\Program Files\PostgreSQL\11\bin\psql.exe" -U postgres petty < Data\x-VoucherSettlements.sql
|
|
@ -49,6 +49,7 @@ def main(argv=sys.argv):
|
|||
dbsession.add(Permission("Guest Book", uuid.UUID("7669dfc9-cc75-4e48-b267-145c8832a83c")))
|
||||
dbsession.add(Permission("Printers", uuid.UUID("5b66c6f6-003a-4ef8-ba28-49b8ff1ac33c")))
|
||||
dbsession.add(Permission("Sections", uuid.UUID("c973f32c-a37b-496a-8dc5-60d2e4c39e97")))
|
||||
dbsession.add(Permission("Section Printers", uuid.UUID("7a04ba63-5d08-4078-9051-a6d91cce3e48")))
|
||||
else:
|
||||
add_permissions(dbsession)
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ from barker.models.validation_exception import ValidationError
|
|||
request_method="POST",
|
||||
route_name="v1_devices_new",
|
||||
renderer="json",
|
||||
permission="Tables",
|
||||
permission="Devices",
|
||||
trans=True,
|
||||
)
|
||||
def save(request):
|
||||
|
@ -33,7 +33,7 @@ def save(request):
|
|||
request_method="PUT",
|
||||
route_name="v1_devices_id",
|
||||
renderer="json",
|
||||
permission="Tables",
|
||||
permission="Devices",
|
||||
trans=True,
|
||||
)
|
||||
def update(request):
|
||||
|
@ -57,7 +57,7 @@ def update(request):
|
|||
request_method="DELETE",
|
||||
route_name="v1_devices_id",
|
||||
renderer="json",
|
||||
permission="Tables",
|
||||
permission="Devices",
|
||||
trans=True,
|
||||
)
|
||||
def delete(request):
|
||||
|
@ -80,7 +80,7 @@ def delete(request):
|
|||
request_method="GET",
|
||||
route_name="v1_devices_new",
|
||||
renderer="json",
|
||||
permission="Tables",
|
||||
permission="Authenticated",
|
||||
)
|
||||
def show_blank(request):
|
||||
return device_info(None, request.dbsession)
|
||||
|
@ -90,7 +90,7 @@ def show_blank(request):
|
|||
request_method="GET",
|
||||
route_name="v1_devices_id",
|
||||
renderer="json",
|
||||
permission="Tables",
|
||||
permission="Authenticated",
|
||||
)
|
||||
def show_id(request):
|
||||
return device_info(uuid.UUID(request.matchdict["id"]), request.dbsession)
|
||||
|
|
|
@ -14,7 +14,7 @@ from barker.models.validation_exception import ValidationError
|
|||
request_method="POST",
|
||||
route_name="v1_menu_categories_new",
|
||||
renderer="json",
|
||||
permission="Menu Categories",
|
||||
permission="Products",
|
||||
trans=True,
|
||||
)
|
||||
def save(request):
|
||||
|
@ -39,7 +39,7 @@ def save(request):
|
|||
request_method="PUT",
|
||||
route_name="v1_menu_categories_id",
|
||||
renderer="json",
|
||||
permission="Menu Categories",
|
||||
permission="Products",
|
||||
trans=True,
|
||||
)
|
||||
def update(request):
|
||||
|
@ -69,7 +69,7 @@ def update(request):
|
|||
request_method="DELETE",
|
||||
route_name="v1_menu_categories_id",
|
||||
renderer="json",
|
||||
permission="Menu Categories",
|
||||
permission="Products",
|
||||
trans=True,
|
||||
)
|
||||
def delete(request):
|
||||
|
@ -107,7 +107,7 @@ def show_blank(request):
|
|||
request_method="GET",
|
||||
route_name="v1_menu_categories_id",
|
||||
renderer="json",
|
||||
permission="Menu Categories",
|
||||
permission="Products",
|
||||
)
|
||||
def show_id(request):
|
||||
return menu_category_info(uuid.UUID(request.matchdict["id"]), request.dbsession)
|
||||
|
@ -183,7 +183,7 @@ def sale_list(request):
|
|||
request_method="POST",
|
||||
route_name="v1_menu_categories_list",
|
||||
renderer="json",
|
||||
permission="Menu Categories",
|
||||
permission="Products",
|
||||
trans=True,
|
||||
)
|
||||
def sort_order(request):
|
||||
|
|
|
@ -7,40 +7,60 @@ from pyramid.view import view_config
|
|||
from barker.models import Permission, Role
|
||||
|
||||
|
||||
@view_config(request_method='POST', route_name='v1_roles_new', renderer='json', permission='Users', trans=True)
|
||||
@view_config(
|
||||
request_method="POST",
|
||||
route_name="v1_roles_new",
|
||||
renderer="json",
|
||||
permission="Users",
|
||||
trans=True,
|
||||
)
|
||||
def save(request):
|
||||
item = Role(request.json_body['name'])
|
||||
item = Role(request.json_body["name"])
|
||||
request.dbsession.add(item)
|
||||
add_permissions(item, request.json_body['permissions'], request.dbsession)
|
||||
add_permissions(item, request.json_body["permissions"], request.dbsession)
|
||||
transaction.commit()
|
||||
return role_info(item.id, request.dbsession)
|
||||
|
||||
|
||||
@view_config(request_method='PUT', route_name='v1_roles_id', renderer='json', permission='Users', trans=True)
|
||||
@view_config(
|
||||
request_method="PUT",
|
||||
route_name="v1_roles_id",
|
||||
renderer="json",
|
||||
permission="Users",
|
||||
trans=True,
|
||||
)
|
||||
def update(request):
|
||||
id_ = request.matchdict['id']
|
||||
id_ = request.matchdict["id"]
|
||||
item = request.dbsession.query(Role).filter(Role.id == uuid.UUID(id_)).one()
|
||||
item.name = request.json_body['name']
|
||||
add_permissions(item, request.json_body['permissions'], request.dbsession)
|
||||
item.name = request.json_body["name"]
|
||||
add_permissions(item, request.json_body["permissions"], request.dbsession)
|
||||
transaction.commit()
|
||||
return role_info(item.id, request.dbsession)
|
||||
|
||||
|
||||
def add_permissions(role, permissions, dbsession):
|
||||
for permission in permissions:
|
||||
id_ = uuid.UUID(permission['id'])
|
||||
id_ = uuid.UUID(permission["id"])
|
||||
rp = [p for p in role.permissions if p.id == id_]
|
||||
rp = None if len(rp) == 0 else rp[0]
|
||||
if permission['enabled'] and rp is None:
|
||||
permission_object = dbsession.query(Permission).filter(Permission.id == id_).one()
|
||||
if permission["enabled"] and rp is None:
|
||||
permission_object = (
|
||||
dbsession.query(Permission).filter(Permission.id == id_).one()
|
||||
)
|
||||
role.permissions.append(permission_object)
|
||||
elif not permission['enabled'] and rp:
|
||||
elif not permission["enabled"] and rp:
|
||||
role.permissions.remove(rp)
|
||||
|
||||
|
||||
@view_config(request_method='DELETE', route_name='v1_roles_id', renderer='json', permission='Users', trans=True)
|
||||
@view_config(
|
||||
request_method="DELETE",
|
||||
route_name="v1_roles_id",
|
||||
renderer="json",
|
||||
permission="Users",
|
||||
trans=True,
|
||||
)
|
||||
def delete(request):
|
||||
id_ = request.matchdict['id']
|
||||
id_ = request.matchdict["id"]
|
||||
if id_ is None:
|
||||
response = Response("Role is Null")
|
||||
response.status_int = 500
|
||||
|
@ -51,22 +71,42 @@ def delete(request):
|
|||
return response
|
||||
|
||||
|
||||
@view_config(request_method='GET', route_name='v1_roles_id', renderer='json', permission='Authenticated')
|
||||
@view_config(
|
||||
request_method="GET",
|
||||
route_name="v1_roles_id",
|
||||
renderer="json",
|
||||
permission="Authenticated",
|
||||
)
|
||||
def show_id(request):
|
||||
id_ = uuid.UUID(request.matchdict['id'])
|
||||
id_ = uuid.UUID(request.matchdict["id"])
|
||||
return role_info(id_, request.dbsession)
|
||||
|
||||
|
||||
@view_config(request_method='GET', route_name='v1_roles_new', renderer='json', permission='Authenticated')
|
||||
@view_config(
|
||||
request_method="GET",
|
||||
route_name="v1_roles_new",
|
||||
renderer="json",
|
||||
permission="Authenticated",
|
||||
)
|
||||
def show_blank(request):
|
||||
return role_info(None, request.dbsession)
|
||||
|
||||
|
||||
@view_config(request_method='GET', route_name='v1_roles_list', renderer='json', permission='Authenticated')
|
||||
@view_config(
|
||||
request_method="GET",
|
||||
route_name="v1_roles_list",
|
||||
renderer="json",
|
||||
permission="Authenticated",
|
||||
)
|
||||
def show_list(request):
|
||||
list_ = request.dbsession.query(Role).order_by(Role.name).all()
|
||||
return [
|
||||
{'id': item.id, 'name': item.name, 'permissions': sorted(p.name for p in item.permissions)} for item in list_
|
||||
{
|
||||
"id": item.id,
|
||||
"name": item.name,
|
||||
"permissions": sorted(p.name for p in item.permissions),
|
||||
}
|
||||
for item in list_
|
||||
]
|
||||
|
||||
|
||||
|
@ -74,14 +114,22 @@ def role_info(item, dbsession):
|
|||
permissions = dbsession.query(Permission).order_by(Permission.name).all()
|
||||
if item is None:
|
||||
return {
|
||||
'name': '',
|
||||
'permissions': [{'id': p.id, 'name': p.name, 'enabled': False} for p in permissions]
|
||||
"name": "",
|
||||
"permissions": [
|
||||
{"id": p.id, "name": p.name, "enabled": False} for p in permissions
|
||||
],
|
||||
}
|
||||
if type(item) is uuid.UUID:
|
||||
item = dbsession.query(Role).filter(Role.id == item).first()
|
||||
return {
|
||||
'id': item.id,
|
||||
'name': item.name,
|
||||
'permissions': [{'id': p.id, 'name': p.name, 'enabled': True if p in item.permissions else False}
|
||||
for p in permissions]
|
||||
"id": item.id,
|
||||
"name": item.name,
|
||||
"permissions": [
|
||||
{
|
||||
"id": p.id,
|
||||
"name": p.name,
|
||||
"enabled": True if p in item.permissions else False,
|
||||
}
|
||||
for p in permissions
|
||||
],
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ from barker.models.validation_exception import ValidationError
|
|||
request_method="POST",
|
||||
route_name="v1_section_printers_id",
|
||||
renderer="json",
|
||||
permission="Products",
|
||||
permission="Section Printers",
|
||||
trans=True,
|
||||
)
|
||||
def save(request):
|
||||
|
@ -79,7 +79,7 @@ def save(request):
|
|||
request_method="DELETE",
|
||||
route_name="v1_section_printers_id",
|
||||
renderer="json",
|
||||
permission="Products",
|
||||
permission="Section Printers",
|
||||
trans=True,
|
||||
)
|
||||
def delete(request):
|
||||
|
|
|
@ -5,55 +5,55 @@
|
|||
Login
|
||||
</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'guest-book']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Guest Book')" [routerLink]="['/', 'guest-book']">
|
||||
<h3 class="item-name">Guest Book</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sales']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Sales')" [routerLink]="['/', 'sales']">
|
||||
<h3 class="item-name">Sales</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'checkout']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Cashier Checkout')" [routerLink]="['/', 'checkout']">
|
||||
<h3 class="item-name">Cashier Checkout</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sale-analysis']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Sales Analysis')" [routerLink]="['/', 'sale-analysis']">
|
||||
<h3 class="item-name">Sale Analysis</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'tables']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Tables')" [routerLink]="['/', 'tables']">
|
||||
<h3 class="item-name">Tables</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sections']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Sections')" [routerLink]="['/', 'sections']">
|
||||
<h3 class="item-name">Sections</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'menu-categories']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Products')" [routerLink]="['/', 'menu-categories']">
|
||||
<h3 class="item-name">Menu Categories</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'sale-categories']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Products')" [routerLink]="['/', 'sale-categories']">
|
||||
<h3 class="item-name">Sale Categories</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'products']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Products')" [routerLink]="['/', 'products']">
|
||||
<h3 class="item-name">Products</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'modifier-categories']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Modifiers')" [routerLink]="['/', 'modifier-categories']">
|
||||
<h3 class="item-name">Modifier Categories</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'modifiers']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Modifiers')" [routerLink]="['/', 'modifiers']">
|
||||
<h3 class="item-name">Modifiers</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'taxes']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Taxes')" [routerLink]="['/', 'taxes']">
|
||||
<h3 class="item-name">Taxes</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'devices']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Devices')" [routerLink]="['/', 'devices']">
|
||||
<h3 class="item-name">Devices</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'section-printers']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Section Printers')" [routerLink]="['/', 'section-printers']">
|
||||
<h3 class="item-name">Section Printers</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'printers']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Printers')" [routerLink]="['/', 'printers']">
|
||||
<h3 class="item-name">Printers</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'roles']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Users')" [routerLink]="['/', 'roles']">
|
||||
<h3 class="item-name">Roles</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'users']">
|
||||
<mat-card fxLayout="column" class="square-button" matRipple *ngIf="auth.hasPermission('Users')" [routerLink]="['/', 'users']">
|
||||
<h3 class="item-name">Users</h3>
|
||||
</mat-card>
|
||||
<mat-card fxLayout="column" class="square-button" matRipple [routerLink]="['/', 'logout']"
|
||||
|
|
|
@ -11,7 +11,7 @@ import { map, share } from 'rxjs/operators';
|
|||
export class HomeComponent implements OnInit {
|
||||
public user: Observable<string>;
|
||||
|
||||
constructor(private auth: AuthService) {
|
||||
constructor(public auth: AuthService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
|
|
@ -13,7 +13,7 @@ const roleRoutes: Routes = [
|
|||
component: ModifierCategoryListComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Users'
|
||||
permission: 'Modifiers'
|
||||
},
|
||||
resolve: {
|
||||
list: ModifierCategoryListResolver
|
||||
|
@ -24,7 +24,7 @@ const roleRoutes: Routes = [
|
|||
component: ModifierCategoryDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Users'
|
||||
permission: 'Modifiers'
|
||||
},
|
||||
resolve: {
|
||||
item: ModifierCategoryResolver,
|
||||
|
@ -35,7 +35,7 @@ const roleRoutes: Routes = [
|
|||
component: ModifierCategoryDetailComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Users'
|
||||
permission: 'Modifiers'
|
||||
},
|
||||
resolve: {
|
||||
item: ModifierCategoryResolver
|
||||
|
|
|
@ -13,7 +13,7 @@ const sectionPrinterRoutes: Routes = [
|
|||
component: SectionPrinterComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Users'
|
||||
permission: 'Section Printers'
|
||||
},
|
||||
resolve: {
|
||||
item: SectionPrinterResolver,
|
||||
|
@ -26,7 +26,7 @@ const sectionPrinterRoutes: Routes = [
|
|||
component: SectionPrinterComponent,
|
||||
canActivate: [AuthGuard],
|
||||
data: {
|
||||
permission: 'Users'
|
||||
permission: 'Section Printers'
|
||||
},
|
||||
resolve: {
|
||||
item: SectionPrinterResolver,
|
||||
|
|
Loading…
Reference in New Issue