Skip to content
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

Make sure group management works with all types of group names #20035

Merged
merged 3 commits into from
Apr 11, 2020

Conversation

juliushaertl
Copy link
Member

Group ids currently don't have any character limitations, which means that you can create groups like "Department A/B" which will fail on both the provisioning API as well as the routes provided by our user management.

This PR ensures that all group ids are encoded and properly handled by both the backend and the frontend then.

I'm not to happy about the double encoding here, but this is the only way that we can keep the groupId as part of the URL without making it a query parameter and therefore breaking the provisioning api.

In general I would prefer to add some character limitation to the group id, similar to how we do it for the user id, where / is blocked, but that would still leave us with instances that might have those broken ids.

@juliushaertl
Copy link
Member Author

cc @rullzer @GretaD for review since it also fails for me to request that now.

@skjnldsv
Copy link
Member

Maybe add some phpunit testing? 🙈

@juliushaertl
Copy link
Member Author

Yeah, I'll do that. Anyone has concerns/ideas regarding the double encoding?

@skjnldsv
Copy link
Member

Looks sane to me

@gary-kim
Copy link
Member

gary-kim commented Mar 30, 2020

Yeah, I'll do that. Anyone has concerns/ideas regarding the double encoding?

Not a fan but if it works...then great!

@juliushaertl
Copy link
Member Author

Added some test cases 😉

@juliushaertl
Copy link
Member Author

/backport to stable18

@juliushaertl
Copy link
Member Author

Rebased and ready for review.

Copy link
Contributor

@GretaD GretaD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested and works 👍

@juliushaertl juliushaertl force-pushed the bugfix/group-encode branch 2 times, most recently from ccea55c to 3ec9a01 Compare April 9, 2020 09:44
@blizzz blizzz added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 9, 2020
@rullzer rullzer mentioned this pull request Apr 9, 2020
59 tasks
Signed-off-by: Julius Härtl <jus@bitgrid.net>
@skjnldsv
Copy link
Member

/compile amend /

Signed-off-by: Julius Härtl <jus@bitgrid.net>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
@backportbot-nextcloud
Copy link

backport to stable18 in #20433 with conflicts ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish bug feature: users and groups
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants