Status Update
Comments
te...@gmail.com <te...@gmail.com> #2
Also if you add one record that works, let's say: user/admin and second that not user/name.surname, then only admin is saved, and record with name.surname is not present in payload.
te...@gmail.com <te...@gmail.com> #4
Yes, I can confirm that upgrade fix the issue, thank you.
is...@google.com <is...@google.com> #5
Edits were made to reflect the following in Monorail: auto-CCs.
Description
Affected Version: 3.1.2
What steps will reproduce the problem?
1. First of you need plugin singleusergroup
2. Create user which have dot in they login, for instance name.surname (this is quite common scheme in companies)
3. Try to add this user to any reference, with any right
What is the expected output?
I would expect such access rules would be save.
What do you see instead?
Dialog/Toast with "No changes to save." in left-down corner.
There are no console logs since there is no request send, it seems like PolyGerrit UI ignores fact such record exists/have been added through GUI. On the other hand you can save access rule with default admin user: user/admin, I also defined user jenkins: user/jenkins and he's also saveable, it seems only logins with dot cause problems for UI to consider them as existing ones.
I have also try to look into issue a bit more. I have fetch request from Firefox that is made for admin.
curl 'https://gerrit.local/projects/Project/access ' -H 'User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko/20100101 Firefox/70.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Content-Type: application/json' -H 'X-Gerrit-Auth: aSceprrGF9KBrcFbMnnI6U6.c.XsoWgbSW' -H 'Origin: https://gerrit.local ' -H 'DNT: 1' -H 'Connection: keep-alive' -H 'Cookie: GerritAccount=aSceprrMv2TZe3-M-z952Lm11VYLkWRq7G; XSRF_TOKEN=aSceprrGF9KBrcFbMnnI6U6.c.XsoWgbSW' -H 'TE: Trailers' --data '{"add":{"refs/heads/*":{"permissions":{"push":{"rules":{"user:admin":{"force":false,"action":"ALLOW","added":true}}}}}},"remove":{}}'
When I change "admin" to "name.surname" such curl works, so this is not a REST problem, it looks like pure JavaScript problem, that PolyGerrit do not consider such record as change and the record is skipped from payload.
It also do not affects "true" groups (not the one provided by plugin) with dots since there are hashes (like e1ef75ed211039f5f93b4283fa1819bfc2f44a38) instead of name with dot are used.