@@ -13,7 +13,7 @@ import { ListPricingTierOptions } from "../types/PricingTier";
1313import { ListRoleOptions } from "../types/Role" ;
1414import { CreateUserParams , ListUserOptions , UpdateUserParams } from "../types/User" ;
1515import { ListTenantOptions } from "../types/Tenant" ;
16- import { Context , WarrantObject } from "../types/Warrant" ;
16+ import { PolicyContext , WarrantObject } from "../types/Warrant" ;
1717import WarrantModule from "./WarrantModule" ;
1818
1919export default class User implements WarrantObject {
@@ -174,7 +174,7 @@ export default class User implements WarrantObject {
174174 return Permission . removePermissionFromUser ( this . userId , permissionId ) ;
175175 }
176176
177- public async hasPermission ( permissionId : string , context : Context = { } ) : Promise < boolean > {
177+ public async hasPermission ( permissionId : string , context : PolicyContext = { } ) : Promise < boolean > {
178178 return Authorization . hasPermission ( { permissionId : permissionId , subject : { objectType : ObjectType . User , objectId : this . userId } , context : context } ) ;
179179 }
180180
@@ -202,7 +202,7 @@ export default class User implements WarrantObject {
202202 return Feature . removeFeatureFromUser ( this . userId , featureId ) ;
203203 }
204204
205- public async hasFeature ( featureId : string , context : Context = { } ) : Promise < boolean > {
205+ public async hasFeature ( featureId : string , context : PolicyContext = { } ) : Promise < boolean > {
206206 return Authorization . hasFeature ( { featureId : featureId , subject : { objectType : ObjectType . User , objectId : this . userId } , context : context } ) ;
207207 }
208208
0 commit comments