-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
The error message is not user-friendly when adding duplicate permissi… #12805
base: develop
Are you sure you want to change the base?
Conversation
Thanks for your this PR. 🙏 感谢您提交的PR。 🙏 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #12805 +/- ##
=============================================
- Coverage 72.17% 72.13% -0.05%
+ Complexity 9792 9791 -1
=============================================
Files 1283 1283
Lines 41387 41398 +11
Branches 4374 4378 +4
=============================================
- Hits 29872 29863 -9
- Misses 9408 9427 +19
- Partials 2107 2108 +1
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
|
Is relatived with #12803? |
It's relatived with #12773 |
But I think add these two http api can't solve this problem. the console ui will not call these two api. |
My colleague has already submitted a Pull Request (PR). The console ui will call the new API to check if the permission already exists. |
So I ask you whether your pr is relative with #12803 ? |
yes, it's relative with #12803 |
*/ | ||
@GetMapping | ||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "permissions", action = ActionTypes.READ) | ||
public Boolean isDuplicatePermission(@RequestParam String role, @RequestParam String resource, @RequestParam String action) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we response with Result?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not response with a result, how can ui judge whether a permission is duplicate
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean response with class com.alibaba.nacos.api.model.v2.Result not only return an Boolean.
|
*/ | ||
@GetMapping | ||
@Secured(resource = AuthConstants.CONSOLE_RESOURCE_NAME_PREFIX + "permissions", action = ActionTypes.READ) | ||
public Boolean isDuplicatePermission(@RequestParam String role, @RequestParam String resource, @RequestParam String action) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean response with class com.alibaba.nacos.api.model.v2.Result not only return an Boolean.
|
…ons. (#12773)
What is the purpose of the change
The error message is not user-friendly when adding duplicate permissions.