-
Notifications
You must be signed in to change notification settings - Fork 198
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
chore: Remove empty scopemaps #3170
base: master
Are you sure you want to change the base?
Conversation
If an empty change is inherently a delete in the internal interface then why not match this in the API? |
Wouldn't want someone to run It should be very clear when a scope map is created / updated or deleted and we wouldn't want someone to accidentally create a scope map just to find it missing because it was empty and therefore deleted. |
@@ -200,6 +200,11 @@ pub(crate) async fn oauth2_id_scopemap_post( | |||
Json(scopes): Json<Vec<String>>, | |||
) -> Result<Json<()>, WebError> { | |||
let filter = oauth2_id(&rs_name); | |||
|
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.
Yeah, I think we don't need this error here, if you set an empty scope map via the api, you're saying "it doesn't need to be set". I think just the changes to valueset suffice here since the cli has some other ux guards now.
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.
Did we want to delete the entire delete endpoint then as a delete would become a empty update? Depricate the api and switch over the cli?
@CEbbinghaus Any issues if I finish this PR for you? I reckon I could smash it out tomorrow. |
Oh shit. I forgot I still had this open. Let me check but I'd like to finish what I started. Gotta get my contrib score up somehow |
Change summary
This change removes the ability to create or update a scope map with a list of scopes that is empty. It also deletes a scope map that is inserted and empty.
Fixes #3167
Fixes #3168
Checklist