module provinces
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { AuthUser } from '../../auth/interfaces/auth-user.interface';
|
||||
import { AuthorizationService } from '../authorization.service';
|
||||
|
||||
@Injectable()
|
||||
export class ProvincePolicy {
|
||||
constructor(private readonly authorizationService: AuthorizationService) {}
|
||||
|
||||
canManage(user: AuthUser): boolean {
|
||||
return this.authorizationService.isAdmin(user);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user