getAllNamedRoles returning null
See original GitHub issueI have implemented these two methods:
async getAllUserRoles(){
let roles = this.enforcer.getAllNamedRoles('g');
return roles;
}
async getAllResourceRoles(){
let roles = this.enforcer.getAllNamedRoles('g2');
return roles;
}
And some of my policies are:
g, test_role, admin
g, sub_role_test1, test_role
g, sub_role_test2, test_role
g, sub_role_test2, test_role
g, test_role_2, admin
g, user_test, just_test_role
g2, glosas, plataforma
g2, credentials, plataforma
In both methods the result is null. Is this a bug?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why does getLocalName() return null? - java - Stack Overflow
The Javadoc states that getLocalName() returns null for this type of node. Why node is of type DOCUMENT_POSITION_DISCONNECTED and not ELEMENT_ ...
Read more >Enforcer class - casbin library - Dart API - Pub.dev
Returns false if the user or role does not have any permissions (aka not affected). deleteRole(String role) → void: deleteRole deletes a role....
Read more >Client Class — Aerospike documentation - Read the Docs
Tests the connections between the client and the nodes of the cluster. If the result is False , the client will require another...
Read more >aerospike Documentation - Read the Docs
aerospike is a package which provides a Python client for Aerospike database ... Returns a type representing the server-side type as_null.
Read more >How to Avoid Returning Null from a Method - Coding Helmet
Simply put, the result is – null. What do we do with the null result then? Obviously, in languages like C++, Java or...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@lucaslrolim
getAllRoles()
callsgetAllNamedRoles()
internally, so it proves this function works for at least for the example.The error was really related to the order of my Express routes. Sorry about the mistake e thank you for the help @hsluoyz and @nodece.