stable

Clone or download

Read-only

feat: Redirect to project when sys_user_approval = 1

Run the following command: tuleap config-set sys_user_approval 1 Invite someone. When user register, admin has to activate the account. User is then automatically added to the project and receives a welcome-to-project email. On first login, instead of being redirected to /my/, user is redirected to project dashboard with a welcome modal. If user clicks on the project link in the welcome-to-project email, then the redirection is made directly to the project dashboard instead of the intermediate `/my/redirect.php` and then welcome modal is also displayed on first login. Extracting ProjectMemberAccordingToInvitationAdder allowed to discover two issues in the previous implementation that are now fixed: * Condition to add just created user was wrong (error if `! active && restricted` instead of `! active && ! restricted`) * Membership delegation was not checked Part of story #30021: Invite buddies to my Tuleap project Change-Id: I7da24b9f6a2332c41019737c79e36fbe7a2f6fba

Modified Files

Name
M src/common/InviteBuddy/AccountCreationFeedback.php +2 −74 Go to diff View file
A src/common/InviteBuddy/ProjectMemberAccordingToInvitationAdder.php +111 −0 Go to diff View file
M src/common/Request/RouteCollector.php +24 −15 Go to diff View file
M src/common/User/User.class.php +5 −0 Go to diff View file
M src/common/User/UserManager.class.php +6 −1 Go to diff View file
M src/common/dao/UserDao.class.php +3 −2 Go to diff View file
M src/www/admin/approve_pending_users.php +42 −2 Go to diff View file
M src/www/include/account.php +19 −0 Go to diff View file
M tests/unit/common/InviteBuddy/AccountCreationFeedbackTest.php +118 −37 Go to diff View file
M tests/unit/common/InviteBuddy/InvitationSenderTest.php +0 −3 Go to diff View file
A tests/unit/common/InviteBuddy/ProjectMemberAccordingToInvitationAdderTest.php +454 −0 Go to diff View file