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 committed 2019-08-08 16:35:03 +05:30
1 parent c81b92c336
commit 6503982897
8 files changed
+141 -21

No files matched your search

+4
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;
}
}