get subscription in admin

This commit is contained in:
2026-07-08 22:23:14 +03:30
parent 3250a6456b
commit 1dd2813a01
34 changed files with 188 additions and 119 deletions
+4 -1
View File
@@ -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;
}
+1 -3
View File
@@ -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 {