We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch casbin@5.11.5 for the project I'm working on.
casbin@5.11.5
Here is the diff that solved my problem:
diff --git a/node_modules/casbin/lib/cjs/coreEnforcer.js b/node_modules/casbin/lib/cjs/coreEnforcer.js index b9e4f06..9e9ff26 100644 --- a/node_modules/casbin/lib/cjs/coreEnforcer.js +++ b/node_modules/casbin/lib/cjs/coreEnforcer.js @@ -158,6 +158,7 @@ class CoreEnforcer { async loadPolicy() { this.model.clearPolicy(); await this.adapter.loadPolicy(this.model); + this.model.printPolicy(); this.sortPolicies(); if (this.autoBuildRoleLinks) { await this.buildRoleLinksInternal(); diff --git a/node_modules/casbin/lib/cjs/rbac/defaultRoleManager.js b/node_modules/casbin/lib/cjs/rbac/defaultRoleManager.js index 1db1411..c3a25db 100644 --- a/node_modules/casbin/lib/cjs/rbac/defaultRoleManager.js +++ b/node_modules/casbin/lib/cjs/rbac/defaultRoleManager.js @@ -285,8 +285,10 @@ class DefaultRoleManager { */ async printRoles() { if (log_1.getLogger().isEnable()) { - [...this.allDomains.values()].forEach((n) => { - log_1.logPrint(n.toString()); + [...this.allDomains.values()].forEach((roles) => { + roles.forEach(n => { + log_1.logPrint(n.toString()); + }); }); } }
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered:
@Gabriel-403 @Zxilly @kingiw @nodece
Sorry, something went wrong.
Do you want to print the policy data?
async printRoles() { if (log_1.getLogger().isEnable()) { [...this.allDomains.values()].forEach((roles) => { console.log(roles);// Roles(0) [Map] {} roles.forEach(n => { log_1.logPrint(n.toString()); }); }); } }
@gensir plz make a PR!
#330
hsluoyz
Successfully merging a pull request may close this issue.
Hi! 馃憢
Firstly, thanks for your work on this project! 馃檪
Today I used patch-package to patch
casbin@5.11.5
for the project I'm working on.Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: