Skip to content

Commit

Permalink
feat: support setNamedRoleManager() (#416)
Browse files Browse the repository at this point in the history
  • Loading branch information
imp2002 committed Jan 21, 2023
1 parent 2b2cfb8 commit 869e8f9
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/coreEnforcer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,16 @@ export class CoreEnforcer {
this.rmMap.set('g', rm);
}

/**
* setRoleManager sets the role manager for the named policy.
*
* @param ptype the named policy.
* @param rm the role manager.
*/
public setNamedRoleManager(ptype: string, rm: RoleManager): void {
this.rmMap.set(ptype, rm);
}

/**
* getRoleManager gets the current role manager.
*/
Expand Down

0 comments on commit 869e8f9

Please sign in to comment.