-
Notifications
You must be signed in to change notification settings - Fork 16
Add error handling for role updates assigned by workspace groups #482
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
Conversation
Signed-off-by: lhhyung <lhhyung511@megazone.com>
Signed-off-by: lhhyung <lhhyung511@megazone.com>
|
✅ Why it is requiredThe Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO. Contributors sign-off that they adhere to these requirements by adding a Git even has a |
|
✅ Why it is requiredThe Developer Certificate of Origin (DCO) is a lightweight way for contributors to certify that they wrote or otherwise have the right to submit the code they are contributing to the project. Here is the full text of the DCO. Contributors sign-off that they adhere to these requirements by adding a Git even has a |
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.
Pull Request Overview
This PR improves error handling by replacing a generic permission denied error with a more specific error message when attempting to update roles that were assigned by workspace groups.
- Introduces a new specific error class for workspace group role update restrictions
- Updates the role binding service to use the new error instead of a generic permission denied error
- Changes the default value for
reset_passwordparameter fromNonetoFalsein user update requests
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/spaceone/identity/error/error_role.py | Adds new error class with descriptive message for workspace group role update restrictions |
| src/spaceone/identity/service/role_binding_service.py | Updates error handling to use the new specific error instead of generic permission denied |
| src/spaceone/identity/model/user/request.py | Changes reset_password default from None to False |
| class ERROR_NOT_ALLOWED_TO_UPDATE_ROLE_ASSIGNED_BY_WORKSPACE_GROUP( | ||
| ERROR_INVALID_ARGUMENT | ||
| ): | ||
| _message = "Roles assigned by a Workspace Group cannot be updated from the User menu. (role_binding_id = {role_binding_id})" |
Copilot
AI
Aug 12, 2025
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.
The error message contains a placeholder {role_binding_id} but the parameter being passed in the service is role_binding_id. The message should use {value} to match the parameter name being passed, or the service should pass role_binding_id=params.role_binding_id instead of value=params.role_binding_id.
| _message = "Roles assigned by a Workspace Group cannot be updated from the User menu. (role_binding_id = {role_binding_id})" | |
| _message = "Roles assigned by a Workspace Group cannot be updated from the User menu. (role_binding_id = {value})" |
Category
Description
Add error handling for role updates assigned by workspace groups
Known issue