stable

Clone or download

Read-only

request #10931: Cannot add a site administrator to a project adminstrators users group

Various issues are fixed in this commit: - the rest route that is called in the javascript should be made against project members ugroup and not current ugroup (We want to know if the user is project member). - the method PFUser->isMember() returns true when the user is site administrator. Therefore we cannot use it to ensure that the user is really member of the project. - the same for the rest route that was relying on isMember. Among other things left to the imagination of the reviewer, here are the things to test: - Go to a project ยป admin ยป groups ยป Project administrators. Try to add a site administrator that is not yet member of the project. A confirmation modal should appear and then the user should be member of the project and the project administrators ugroup. - Try to add a regular user that is not yet member of the project. Same behaviour than above. - Try to add a user that is already project member. No modal is displayed. The user is directly added to project administrators. - Call GET /user_groups/:ugroup_id/users with query parameter for all supported dynamic ugroups. Results should be consistent with the current status of ugroups members in the corresponding project. Change-Id: I80adf627f82918e1b3eab09d8541691c52af7295

Modified Files

Name
M src/common/autoload.php +3 โˆ’2 Go to diff View file
M src/common/project/Admin/ProjectUGroup/DynamicUGroupMembersUpdater.php +1 โˆ’1 Go to diff View file
A src/common/project/Admin/ProjectUGroup/UserIsUGroupMemberChecker.php +83 โˆ’0 Go to diff View file
M src/common/project/REST/v1/UserGroupResource.class.php +16 โˆ’6 Go to diff View file
M src/common/project/UserPermissionsDao.php +82 โˆ’1 Go to diff View file
M src/templates/project/admin/ugroup-add-project-administrator-modal.mustache +1 โˆ’1 Go to diff View file
M src/templates/project/admin/ugroup-settings-member-list.mustache +1 โˆ’1 Go to diff View file
M src/www/scripts/project/admin/project-admin-ugroups.js +2 โˆ’2 Go to diff View file