-
Notifications
You must be signed in to change notification settings - Fork 8k
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
ACL design of dashboard #745
Comments
@jasonjoo2010 , I think creating custom annotation based security is the best approach and spring security provide an way include our annotation. You can refer my implementation here. I would like to contribute on this one. |
@thiyagu06 Right. @sczyh30 And what do you think about this issue, should this design go further? Brief:
|
+1 for the idea of annotations of auth control. It's more elegant and convenient than function integrating. Contributions are welcomed. For the design of |
So any updated? What's the conclusion? And kindly @thiyagu06 Thiyagugk are you working on it? |
I agree with this. Using the return value is enough. And it's better to have controller/handler level annotations to declare permission restrictions. @thiyagu06 Any progress on this? |
@sczyh30 , I have started to work on it.. Will let you the progress in few days. |
correct me if i'm wrong. |
Things sounds correctly and i suggest we can mainly restructure logic by introducing new annotations based on current implementations. We mainly make it easy to use/read. And more don't forget we should make it easy to understand for action level AuthUser fetching. @sczyh30 Any suggestion? |
@thiyagu06 Any progress on this? :) |
@thiyagu06 Friendly ping :) |
authTarget 返回值居然没有用作权限判断?那返回值的意义是啥?而且接口的文档上也不注明必须抛异常,或者抛哪个异常,前端页面接收到异常也只会显示【失败】,而不是我写的message。 |
This will be improved in #1042. Further contributions are welcomed! |
Issue Description
Version 1.6.0 introduces authorization and it's an awesome feature. That helps
dashboard
to be more complete.My discussion here is focused on the actual authorizing design.
Interface Design
First i think here is a little fuzzy on
AuthUser. authTarget
.If throwing an exception is an option it's better to include in declaration like:
But i don't think it's a good idea throwing an exception because we have
a boolean value returned
already to mark it success or fail.Integrating
For function integrating we can find following lines everywhere:
It includes two intents:
But it's a little inconvenient. I have a proposal on it like:
or
or even a parent privilege like
When you want user information we can inject it by
Spring Argument Resolver
like:I think we can make more discussions.
The text was updated successfully, but these errors were encountered: