Added hasPermission function to the auth service to check for permissions.
Added: Bill Type selection Fix: Add product would add to old kots if product was added earlier
This commit is contained in:
@ -70,4 +70,8 @@ export class AuthService {
|
||||
);
|
||||
}
|
||||
|
||||
hasPermission(permission: string) : boolean {
|
||||
return this.user !== undefined && this.user.isAuthenticated && this.user.perms.indexOf(permission) !== -1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user