PerlDancer / PerlDancer/Dancer2-Plugin-Auth-Extensible
Feature request: Rights handling based on roles
Nobody has claimed this yet.
- Dominant language
- Perl
- Stars
- 10
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
I need a possibility to define rights based on roles. The roles I get are ActiveDirectory groups the user is a member of (e.g. "developers", "support", "operations"). When restricting a route, e.g. "create_item", I do not want to list the roles that are allowed to do this, but the right the user has to have. This right could be called "create_item" or more general "item_management", depending on the granularity needed.
Now I want to define a mapping in the config file that says:
create_item: developers, operations
which means that you can create an item if you are in the developers or in the operations group. One could extend this to be able to define that a right needs all roles listed.
So if a new role comes into play, I do not have to change the code but only the config.
We should add new keywords like require_right and so on.
Is this something others would also need? I could try to provide a pull request.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files or tests are named. Start by tracing the existing route restriction keywords and configuration handling around create_item; clarify the require_right mapping semantics, including whether rights require any or all mapped roles, before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- perl
- Domain
- authorization
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100