get subscription in admin
This commit is contained in:
@@ -10,7 +10,10 @@ import { AuthorizationService } from '../authorization.service';
|
||||
export class ReservePolicy {
|
||||
constructor(private readonly authorizationService: AuthorizationService) {}
|
||||
|
||||
canCreate(user: AuthUser, reserve: Pick<Reserve, 'salon' | 'customer'>): boolean {
|
||||
canCreate(
|
||||
user: AuthUser,
|
||||
reserve: Pick<Reserve, 'salon' | 'customer'>,
|
||||
): boolean {
|
||||
if (this.authorizationService.isAdmin(user)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -20,9 +20,7 @@ export class StylistPolicy {
|
||||
if (this.authorizationService.isAdmin(user)) {
|
||||
return true;
|
||||
}
|
||||
return (
|
||||
user.role === UserRole.SALON && stylist.salon.ownerId === user.id
|
||||
);
|
||||
return user.role === UserRole.SALON && stylist.salon.ownerId === user.id;
|
||||
}
|
||||
|
||||
canDelete(user: AuthUser, stylist: Stylist): boolean {
|
||||
|
||||
Reference in New Issue
Block a user