@@ -37,14 +37,12 @@ export class UpdatePermission {
|
||||
/**
|
||||
* Converts a Permission object based on this.
|
||||
*/
|
||||
public async toPermission(): Promise<Permission> {
|
||||
let newPermission: Permission = new Permission();
|
||||
public async updatePermission(permission: Permission): Promise<Permission> {
|
||||
permission.principal = await this.getPrincipal();
|
||||
permission.target = this.target;
|
||||
permission.action = this.action;
|
||||
|
||||
newPermission.principal = await this.getPrincipal();
|
||||
newPermission.target = this.target;
|
||||
newPermission.action = this.action;
|
||||
|
||||
return newPermission;
|
||||
return permission;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user