-
Notifications
You must be signed in to change notification settings - Fork 52
Removed: user_management feature flag #5970
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
base: main
Are you sure you want to change the base?
Removed: user_management feature flag #5970
Conversation
Signed-off-by: Mujib Ahasan <[email protected]>
|
Hey @evankanderson, this is the very first push to fix the issue, Please confirm if code changes are correct or not. Although few test cases are not passing in https://github.com/mindersec/minder/blob/main/internal/controlplane/handlers_authz_test.go, could you please guide what changes I need to make here also?? |
evankanderson
left a comment
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've approved the automated test runs, but you probably want to remove the dead code at least (that will probably trigger lint failures). If there are other test failures, I'll take a look after my flight tonight (or maybe sooner).
| // Leaving the role assignment empty as it's an invitation | ||
| Invitation: invitation, | ||
| }, nil | ||
| return nil, util.UserVisibleError(codes.Unimplemented, "user management is not enabled") |
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.
This code is now unreachable, and should be removed.
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.
Thank you for pointing out.
| Invitation: deletedInvitation, | ||
| }, nil | ||
|
|
||
| return nil, util.UserVisibleError(codes.Unimplemented, "user management is not enabled") |
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.
This code is also dead and should be removed.
| }, | ||
| }, nil | ||
|
|
||
| return nil, util.UserVisibleError(codes.Unimplemented, "user management is not enabled") |
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.
More dead code
Signed-off-by: Mujib Ahasan <[email protected]>
|
This appears to have failing tests, possibly because enabling the |
|
Oh, there's also direct access to this flag not through a constant in the test here, at least: https://github.com/mindersec/minder/blob/main/internal/controlplane/handlers_authz_test.go#L577 |
Signed-off-by: Mujib Ahasan <[email protected]>
|
Hey @evankanderson, few changes have been made to normalize those errors, but after that I got few new unwanted errors!! I tried to solve them too but did not work out. These new sets of error occurred because of the mismatch of json. Is there any way I could bypass them? |
|
Sorry for the delay in responding; I was travelling for Thanksgiving, and needed to actually clone and run your code to see what's going on. A bit of history here:
The test you're struggling with was written for the "direct add" functionality. You may want to replace the direct adds in |
|
If it would help, I could write a fake for InvitationService that had the same interfaces as InvitationService, but stored the status in-memory, rather than needing to line up mock calls and responses. |
Summary
The default value of
user_managementflag is false now. But related functionalities sets it to true. This PR is raised for the release of the flag.Fixes #5436