-
Notifications
You must be signed in to change notification settings - Fork 15
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
feat: adds endpoints to manually create users and groups from the provider #863
base: main
Are you sure you want to change the base?
feat: adds endpoints to manually create users and groups from the provider #863
Conversation
This is missing the appropriate security checks at the moment. |
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.
Very nice so far @simonseyock!
@PostMapping("/createFromProvider") | ||
@ResponseStatus(HttpStatus.OK) | ||
public void createFromProvider() { | ||
groupProviderService.createAllGroups(); | ||
} |
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.
Can we add some notes for the OpenAPI spec? The controllers in the BaseController might be a good inspiration.
And can we also add some error handling?
@PostMapping("/createFromProvider") | ||
@ResponseStatus(HttpStatus.OK) | ||
public void createFromProvider() { | ||
userProviderService.createAllUsers(); | ||
} |
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.
See above.
@@ -33,4 +33,5 @@ public interface GroupProviderService<UserType, GroupType> { | |||
|
|||
Group<GroupType> findOrCreateByProviderId(String providerGroupId); | |||
|
|||
void createAllGroups(); |
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 wondering, do we need to flag this commit as breaking?
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.
It's not breaking anything, is it? It's a new feature.
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.
Since it's changing an interface, project implementations would need to include the implementation of the newly added method.
This adds endpoints to manually create users and groups from the provider. This is useful in case the users and groups are not created while shogun is running.
Removed the
LoginListener
because it is not used anymore.Description
Related issues or pull requests
Pull request type
Do you introduce a breaking change?
Checklist
Apache Licence Version 2.0.
mvn test
locally).