Fixed a lot of permissions
This commit is contained in:
1 parent
70d31fea5e
commit
abc29844d3
11 files changed
+133
-84
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user