Status Update
Comments
da...@gmail.com <da...@gmail.com> #2
[Monorail components: plugins>singleusergroup]
mb...@google.com <mb...@google.com> #3
I've attached my patch to the singleusergroup plugin to resolve this, in case one of the maintainers wants to consider it.
FWIW, this would probably break a username with ":" in the name, but that might be invalid anyway.
FWIW, this would probably break a username with ":" in the name, but that might be invalid anyway.
th...@yahoo.com <th...@yahoo.com> #4
mb...@google.com <mb...@google.com> #5
mb...@google.com <mb...@google.com> #6
(someone should close out this bug... I don't have edit privileges)
is...@google.com <is...@google.com> #8
Edits were made to reflect the following in Monorail: auto-CCs.
Description
Affected Version: 2.16.4
What steps will reproduce the problem?https://gerrit.googlesource.com/plugins/singleusergroup/ )
1. Install the singleusergroup plugin (
2. Create a user with a '.' in their account name, e.g. "first.last". The singleusergroup plugin will implicitly define a group with ID "user:first.last"
3. Attempt to grant access rights for a repository to this user's group.
What is the expected output?
Access rights will be saved.
What do you see instead?
Access rights for this user-group are not saved.
What is the output of the JS console log (if applicable)?
Please provide any additional information below.
In gr-permission.js, _handleAddRuleItem(), there is code:
this.set(['permission', 'value', 'rules', groupId], {});
This will fail to do what it's intended to do, when groupId contains a period, based on the API contract of Polymer's set function. (For first.last, it takes "last" as a child of a "first" object.) Because of this, the rest of the code cannot pick up on the permission change, and the UI does not allow granting permissions to dot-containing groups.
I suspect this is probably a regression from the GWT UI, but I have not verified. (But, GWT didn't have such built-in path notations like Polymer.)
My personal fix was to change singleusergroup to expose group UUID's as user:first:last instead of user:first.last, and to validate user:first.last for backwards compatibility with existing saved permissions. Otherwise, fixing this in the Polymer code-base looks a bit tricky.