Skip to content

Instantly share code, notes, and snippets.

@minhntm
Created September 10, 2021 03:41
Show Gist options
  • Save minhntm/df49c2db8d6d98c68594299b26415a6c to your computer and use it in GitHub Desktop.
Save minhntm/df49c2db8d6d98c68594299b26415a6c to your computer and use it in GitHub Desktop.
@Injectable()
export class AuthzService {
constructor(
@InjectRepository(UserRepository)
private userRepository: UserRepository,
) {}
async findAllPermissionsOfUser(user: User): Promise<Permission[]> {
return await this.userRepository.findAllPermissions(user);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment