spring-projects / spring-projects/spring-security
resolvePermission in AclPermissionEvaluator could support String[] and Integer[] permissions
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Summary
The AclPermissionEvaluator could support String[] or Integer[] for the permissions passed in. This would be helpful for me with a custom annotation that I am using.
If this seems like something that would be useful/wanted, I would be more than happy to open a PR for it!
Actual Behavior
resolvePermission checks the type of the permissions passed in - it looks for Integer, Permission, Permission[], or String inputs, and returns a list of Permissions.
Expected Behavior
resolvePermission could also check for Integer[] and String[]. This is made doubly easy by the fact that PermissionFactory has the method buildFromNames(List<String> names) which returns a List<Permission>
Configuration
N/A
Version
5.1.1
Sample
N/A
Contributor guide
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
Start with acl/src/main/java/org/springframework/security/acls/AclPermissionEvaluator.java and inspect resolvePermission's existing Integer, Permission, Permission[], and String handling. Done means String[] and Integer[] inputs are accepted and converted to the returned Permission list, consistently with PermissionFactory.buildFromNames(List).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authorization, security
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100