-
Notifications
You must be signed in to change notification settings - Fork 43
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
Administrators can disable a client #747
Conversation
* Add API and service methods to change client status * Add new columns for client status * Set status as active for new client * Add suspended label next to client name * Add column status_changed_by to client_details * Make client suspension details available to client owner
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 would suggest a refactoring that aligns the new functionality with the others in "FindAccount" API. Mainly by returning ScimUser and splitting the status endpoint in two enable|disable endpoints so the status is not necessary in body, just the clientId.
iam-login-service/src/main/java/it/infn/mw/iam/api/account/find/FindAccountController.java
Show resolved
Hide resolved
iam-login-service/src/main/java/it/infn/mw/iam/api/account/find/DefaultFindAccountService.java
Show resolved
Hide resolved
iam-login-service/src/main/java/it/infn/mw/iam/api/account/find/FindAccountService.java
Outdated
Show resolved
Hide resolved
iam-login-service/src/main/java/it/infn/mw/iam/api/account/find/FindAccountController.java
Outdated
Show resolved
Hide resolved
iam-login-service/src/main/java/it/infn/mw/iam/api/account/find/FindAccountController.java
Outdated
Show resolved
Hide resolved
...in/java/it/infn/mw/iam/api/client/registration/service/DefaultClientRegistrationService.java
Show resolved
Hide resolved
...ervice/src/main/java/it/infn/mw/iam/api/client/management/ClientManagementAPIController.java
Outdated
Show resolved
Hide resolved
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'd move the authz checks at controller level. In the cases users is not allowed to restore a disabled client the exception and a FORBIDDEN response could be returned.
...in/java/it/infn/mw/iam/api/client/registration/service/DefaultClientRegistrationService.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/it/infn/mw/iam/api/client/management/ClientManagementAPIController.java
Outdated
Show resolved
Hide resolved
...ervice/src/main/java/it/infn/mw/iam/api/client/management/ClientManagementAPIController.java
Outdated
Show resolved
Hide resolved
...ce/src/main/java/it/infn/mw/iam/api/client/registration/ClientRegistrationApiController.java
Outdated
Show resolved
Hide resolved
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.
Just a question about status_changed_on default value.
I think after this it's all ok!
...in/resources/db/migration/mysql/V103__add_active_and_status_changed_on_to_client_details.sql
Outdated
Show resolved
Hide resolved
Quality Gate passedIssues Measures |
Replaces #715