stable
Clone or download
As project admin, in a project create a user group with a project member in it (make sure that this user is not project admin). Activate "membership management" delegation for this user group. As member of this user group, invite someone in the project (sys_user_approval=0 will make it easier to test). Once registered, the invitee is added in the project and the history shows that it has been added by the member. Those that are not project admin nor have permission delegation cannot invite buddies in the project. Took the opportunity to extract the double check admin|delegation in a dedicated object to not have to repeat ourselves (and make mistakes). Part of story #30021: Invite buddies to my Tuleap project Change-Id: Iaba0567478f6fce3c24aff605066091df67e8bfc
Modified Files
Name | ||||
---|---|---|---|---|
M | src/common/InviteBuddy/InvitationSender.php | +6 | −13 | Go to diff View file |
M | src/common/InviteBuddy/InviteBuddiesPresenterBuilder.php | +8 | −2 | Go to diff View file |
M | src/common/InviteBuddy/ProjectMemberAccordingToInvitationAdder.php | +2 | −9 | Go to diff View file |
M | src/common/InviteBuddy/REST/v1/InvitationsResource.php | +4 | −3 | Go to diff View file |
M | src/common/Project/Admin/Invitations/ManageProjectInvitationsController.php | +3 | −3 | Go to diff View file |
R | src/common/InviteBuddy/MustBeProjectAdminToInvitePeopleInProjectException.php | Go to diff View file | ||
M | src/common/Project/Admin/ProjectMembers/ProjectMembersController.php | +6 | −25 | Go to diff View file |
A | src/common/Project/Admin/ProjectMembers/UserCanManageProjectMembersChecker.php | +45 | −0 | Go to diff View file |
A | src/common/Project/Admin/ProjectMembers/UserIsNotAllowedToManageProjectMembersException.php | +33 | −0 | Go to diff View file |
M | src/common/Project/Admin/Routing/RejectNonProjectMembersAdministratorMiddleware.php | +8 | −19 | Go to diff View file |
M | src/common/Project/ProjectPresenter.php | +9 | −0 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/AddProjectMember.php | +9 | −5 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdder.php | +2 | −1 | Go to diff View file |
M | src/common/Project/UGroups/Membership/DynamicUGroups/ProjectMemberAdderWithStatusCheckAndNotifications.php | +3 | −2 | Go to diff View file |
M | src/common/Request/RouteCollector.php | +5 | −3 | Go to diff View file |
M | src/common/include/URLVerification.class.php | +7 | −3 | Go to diff View file |
M | src/themes/BurningParrot/include/BurningParrotTheme.php | +3 | −0 | Go to diff View file |
M | src/www/admin/approve_pending_users.php | +0 | −2 | Go to diff View file |
M | src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php | +3 | −0 | Go to diff View file |
M | tests/unit/common/InviteBuddy/AccountCreationFeedbackTest.php | +4 | −18 | Go to diff View file |
M | tests/unit/common/InviteBuddy/InvitationSenderTest.php | +55 | −108 | Go to diff View file |
M | tests/unit/common/InviteBuddy/ProjectMemberAccordingToInvitationAdderTest.php | +0 | −64 | Go to diff View file |
M | tests/unit/common/Project/Admin/Invitations/ManageProjectInvitationsControllerTest.php | +3 | −3 | Go to diff View file |
A | tests/unit/common/Project/Admin/ProjectMembers/EnsureUserCanManageProjectMembersStub.php | +47 | −0 | Go to diff View file |
M | tests/unit/common/Project/Admin/ProjectMembers/ProjectMembersControllerTest.php | +52 | −64 | Go to diff View file |
A | tests/unit/common/Project/Admin/ProjectMembers/UserCanManageProjectMembersCheckerTest.php | +88 | −0 | Go to diff View file |
M | tests/unit/common/Project/Admin/Routing/RejectNonProjectMembersAdministratorMiddlewareTest.php | +4 | −34 | Go to diff View file |
M | tests/unit/common/Project/UGroups/Membership/DynamicUGroups/AddProjectMemberTest.php | +39 | −47 | Go to diff View file |