stable
Clone or download
When the platform is configured for user approval (can be configured with `tuleap config-set sys_user_approval 1`) and user registers via an invitation, then [Validate] button is useless because user email is already validated with the token in the invitation. In that case the button is disabled (as well as its counterpart [Resend email] when platform is switched back to sys_user_approval=0). Backend do not send unnecessary email if user manage to forge the request (by manully removing the disabled attribute for example). Bonus: redirect to self page is added for each actions to prevent form resubmission. Technical note: It would have be best to first refactor the approve_pending_users.php before adding more crap in it. However the amount of needed refactoring is pretty big and refactoring of register.php has already sucked all my will :( There will be dedicated contributions to do it later, if time permits it. Part of request #29614: Invited users shouldn't be mandated to re-confirm their email Change-Id: Ib93e000c402a55fd045f0ccb9beda22edfba0cbf
Modified Files
Name | ||||
---|---|---|---|---|
M | site-content/fr_FR/LC_MESSAGES/tuleap-core.po | +12 | −0 | Go to diff View file |
M | site-content/pt_BR/LC_MESSAGES/tuleap-core.po | +12 | −0 | Go to diff View file |
M | src/common/InviteBuddy/AccountCreationFeedback.php | +7 | −2 | Go to diff View file |
M | src/common/InviteBuddy/Invitation.php | +6 | −1 | Go to diff View file |
M | src/common/InviteBuddy/InvitationDao.php | +17 | −6 | Go to diff View file |
M | src/common/InviteBuddy/InvitationSender.php | +3 | −7 | Go to diff View file |
M | src/common/InviteBuddy/InvitationSuccessFeedback.php | +3 | −1 | Go to diff View file |
M | src/common/User/Account/Register/AccountRegister.php | +2 | −1 | Go to diff View file |
M | src/common/User/Account/Register/InvitationToEmail.php | +2 | −2 | Go to diff View file |
M | src/common/User/Account/Register/RegisterFormHandler.php | +2 | −1 | Go to diff View file |
M | src/common/User/Admin/PendingUserPresenter.php | +12 | −2 | Go to diff View file |
M | src/common/User/Admin/PendingUsersCollectionPresenter.php | +3 | −0 | Go to diff View file |
A | src/common/User/Admin/UserPresenter.php | +42 | −0 | Go to diff View file |
M | src/templates/admin/users/pending.mustache | +44 | −10 | Go to diff View file |
M | src/themes/BurningParrot/css/includes/_siteadmin-pending-users.scss | +6 | −0 | Go to diff View file |
M | src/www/admin/approve_pending_users.php | +61 | −5 | Go to diff View file |
M | tests/integrations/tests/InviteBuddy/InvitationDaoTest.php | +61 | −2 | Go to diff View file |
M | tests/unit/common/Dashboard/User/FirstTimerPresenterBuilderTest.php | +1 | −1 | Go to diff View file |
M | tests/unit/common/InviteBuddy/AccountCreationFeedbackTest.php | +35 | −7 | Go to diff View file |
M | tests/unit/common/InviteBuddy/InvitationSuccessFeedbackStub.php | +3 | −1 | Go to diff View file |
M | tests/unit/common/User/Account/Register/AccountRegisterTest.php | +4 | −2 | Go to diff View file |
M | tests/unit/common/User/Account/Register/AfterSuccessfulUserRegistrationTest.php | +1 | −1 | Go to diff View file |
M | tests/unit/common/User/Account/Register/DisplayRegisterFormControllerTest.php | +5 | −5 | Go to diff View file |
M | tests/unit/common/User/Account/Register/InvitationToEmailRequestExtractorTest.php | +2 | −2 | Go to diff View file |
M | tests/unit/common/User/Account/Register/InvitationToEmailTest.php | +2 | −2 | Go to diff View file |
M | tests/unit/common/User/Account/Register/ProcessRegisterFormControllerTest.php | +5 | −5 | Go to diff View file |