node_acl
node_acl copied to clipboard
Support for the Wildcards in Resource names if it is a url for express
Problem Statement
Hello, i am using this package and so far its going great, but a small thing is annoying me which is if i am using express url's as resource names in the acl allow rules then the wild cards are not supported e.g.
/api/users/login (resource 1) /api/users/signup (resource 2) /api/users/lremove (resource 3)
e.g. in config they would be written as
{
"roles": [ "User" ],
"allows": [
{ "resources": "/api/users/login", "permissions": [ "post", "put", "get", "delete" ] },
{ "resources": "/api/users/signup", "permissions": [ "post", "put", "get", "delete" ] },
{ "resources": "/api/users/remove", "permissions": [ "post", "put", "get", "delete" ] }
]
}
Problem Solution Expected
now to allow these to user we have to define these separately instead of this i am expecting some thing like following in the config
{
"roles": [ "User" ],
"allows": [
{ "resources": "/api/users/*", "permissions": [ "post", "put", "get", "delete" ] }
]
}
That's something we would be happy to see! Feel free to implement.
Glad to hear from you, i shell definitely