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:
Amritanshu
2019-08-08 16:35:03 +05:30
parent c81b92c336
commit 6503982897
8 changed files with 141 additions and 21 deletions

View File

@ -70,4 +70,8 @@ export class AuthService {
);
}
hasPermission(permission: string) : boolean {
return this.user !== undefined && this.user.isAuthenticated && this.user.perms.indexOf(permission) !== -1;
}
}