You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been a fan of this lib for a long time, so now I'm implementing it on a bigger scale than usual in a project and ran into an enhancement.
The context is that we want to connect some custom rules/permissions with roles, and build an UI around this. We like the format of appname:permission_name to name a permission, but this is not very readable for the end-user assigning permissions to roles. Similar to Django's permission system, we'd like to be able to provide a human readable name to the permission.
Looking at the source code, this would make the RuleSet a bit more complex object than a simple dict, a single rule within a RuleSet would probably need to be an object itself where the verbose_name is also kept.
Thoughts? Comments? I'm willing to contribute on this with a PR!
The text was updated successfully, but these errors were encountered:
This sounds great to me and it's definitely desirable given Django's native perms also have this ability. I also like the API. Only question is what verbose_name should be if not specified -- should it be automatically set to the rule name or not?
Hi, I've been a fan of this lib for a long time, so now I'm implementing it on a bigger scale than usual in a project and ran into an enhancement.
The context is that we want to connect some custom rules/permissions with roles, and build an UI around this. We like the format of
appname:permission_name
to name a permission, but this is not very readable for the end-user assigning permissions to roles. Similar to Django's permission system, we'd like to be able to provide a human readable name to the permission.API wise, I suggest extending the API from
to
Looking at the source code, this would make the
RuleSet
a bit more complex object than a simple dict, a single rule within a RuleSet would probably need to be an object itself where the verbose_name is also kept.Thoughts? Comments? I'm willing to contribute on this with a PR!
The text was updated successfully, but these errors were encountered: