-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When repairing logger roles exception #330
Conversation
is' Roles [Map] {} ', resulting in printing failure
@Gabriel-403 @Zxilly @kingiw @nodece please review |
src/coreEnforcer.ts
Outdated
@@ -195,7 +195,7 @@ export class CoreEnforcer { | |||
public async loadPolicy(): Promise<void> { | |||
this.model.clearPolicy(); | |||
await this.adapter.loadPolicy(this.model); | |||
|
|||
this.model.printPolicy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unnecessary, which has a performance issue when has much policy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gensir
|
[...this.allDomains.values()].forEach((n) => { | ||
logPrint(n.toString()); | ||
[...this.allDomains.values()].forEach((roles) => { | ||
roles.forEach((n) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
roles.forEach((n) => { | |
roles.forEach((n) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can do this to fix linting
Fix: #327
When repairing printRoles(), n is' Roles [Map] {} ', resulting in printing failure