-
Notifications
You must be signed in to change notification settings - Fork 6k
[Feature request] Featuren similar to Shiro Wildcard Permissions #4611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm actually just implementing this for the method security context in my project. It's not really hard. Maybe this can be helpful. First thing is a Second thing is a special Finally configure the Why do we want a special |
Dear @HerrDerb, Thanks for your reply. Spring security is official subproject of Spring. Logically speaking, when a project need a auth solution, spring security should be the first option. However, in China, most projects I know are using Shiro. It is a pity for spring security. The two reason I know developers like shiro are easy to use and wildcard permission(which is super powerful for complex permission). With spring security 4.0 release, I think the easy to use is a big progress and acceptable. Thank your for it very much. Now I can describe why I wanted wildcard permission. Let's say I have permissions as following:
[xxx|yy] means optional. Persion admin with permission setting About the performance, usually complex permissions using wildcard permission are in backend system. The request is fairly less than web app for huge web site. So the functionality is more important than performance. Shiro using AntPathMatcher to split the permission and cached the permission objects. Since you already finished it, why not add into Spring Security as an official features. After that I can more easily to recommend Spring security over shiro in the future:) Thanks and have a nice day! Jiming |
A code example
|
My implementation still needs improvement, currently it's only a prototype. Once this is done, I'll create a pull request. |
Great to hear that! |
+1 |
I've prepared a basic commit for this issue. Discussing it now in https://gitter.im/spring-projects/spring-security?source=explore before I create a pull request. |
I've integrated the |
Thanks HerrDerb, That terrific! |
Summary
support Shiro Wildcard Permissions like feature
Actual Behavior
Expected Behavior
Shiro Wildcard Permissions feature is one big highlight than spring security. Which is one important reason a lot of company still using shiro over spring security. Any plan to implements similar feature. So I can persuade other programmer to switch to spring security. Thanks!
Configuration
Version
Sample
The text was updated successfully, but these errors were encountered: