stable
Clone or download
Close request #32278 Removed restricted users are not remove at project visibility switch
When switching from a project visibility that allows restricted users to Private without restricted, then restricted users that are project administrators keep this access right, meaning that they can continue to go to project and do some administration actions. At project visibility switch to Private without restricted, we have to remove the project administration right to restricted users. If this will remove the last administrator, then the project visibility switch must be refused. If the visibility change is triggered and a system events is logged, then restricted adminsitrators are always removed if restricted users are no more part of the project. Note: Nothing is done for Public visibility without restricted as the current code and implementation does nothing special for this visibility. This can be handled in a dedicated commit if needed. Change-Id: I42e2ef7c06e5e5e8af186a19139c532624b6e761
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/ldap/bin/ldap_sync.php | +4 | −1 | Go to diff View file |
M | plugins/ldap/include/LDAP_DirectorySynchronization.class.php | +4 | −2 | Go to diff View file |
M | plugins/ldap/include/ldapPlugin.php | +4 | −2 | Go to diff View file |
A | plugins/project_ownership/include/ProjectAdmin/UpdateVisibilityChecker.php | +46 | −0 | Go to diff View file |
M | plugins/project_ownership/include/ProjectOwner/ProjectOwnerDAO.php | +11 | −0 | Go to diff View file |
A | plugins/project_ownership/include/ProjectOwner/ProjectOwnerRemover.php | +63 | −0 | Go to diff View file |
M | plugins/project_ownership/include/project_ownershipPlugin.php | +26 | −0 | Go to diff View file |
M | plugins/project_ownership/site-content/fr_FR/LC_MESSAGES/tuleap-project_ownership.po | +7 | −0 | Go to diff View file |
M | plugins/project_ownership/site-content/pt_BR/LC_MESSAGES/tuleap-project_ownership.po | +5 | −0 | Go to diff View file |
A | plugins/project_ownership/tests/unit/ProjectAdmin/UpdateVisibilityCheckerTest.php | +80 | −0 | Go to diff View file |
A | plugins/project_ownership/tests/unit/ProjectOwner/ProjectOwnerRemoverTest.php | +129 | −0 | Go to diff View file |
M | site-content/fr_FR/LC_MESSAGES/tuleap-core.po | +9 | −1 | Go to diff View file |
M | site-content/pt_BR/LC_MESSAGES/tuleap-core.po | +5 | −0 | Go to diff View file |
M | src/common/Config/ForgeConfig.php | +1 | −1 | Go to diff View file |
A | src/common/Project/Admin/ForceRemovalOfRestrictedAdministrator.php | +37 | −0 | Go to diff View file |
M | src/common/Project/Admin/ProjectDetails/ProjectDetailsController.php | +17 | −3 | Go to diff View file |
M | src/common/Project/Admin/ProjectMembers/ProjectMembersController.php | +2 | −1 | Go to diff View file |
M | src/common/Project/Admin/ProjectUGroup/MemberRemovalController.php | +2 | −1 | Go to diff View file |
M | src/common/Project/Admin/ProjectVisibilityOptionsForPresenterGenerator.php | +15 | −1 | Go to diff View file |
M | src/common/Project/Admin/ProjectVisibilityPresenter.class.php | +8 | −4 | Go to diff View file |
M | src/common/Project/Admin/ProjectVisibilityPresenterBuilder.php | +7 | −0 | Go to diff View file |
A | src/common/Project/Admin/Visibility/UpdateVisibilityChecker.php | +68 | −0 | Go to diff View file |
A | src/common/Project/Admin/Visibility/UpdateVisibilityIsAllowedEvent.php | +51 | −0 | Go to diff View file |
A | src/common/Project/Admin/Visibility/UpdateVisibilityStatus.php | +52 | −0 | Go to diff View file |
M | src/common/Project/Project.class.php | +2 | −2 | Go to diff View file |
M | src/common/Project/ProjectXMLImporter.class.php | +3 | −1 | Go to diff View file |
M | src/common/Project/Registration/ProjectRegistrationPresenter.php | +1 | −1 | Go to diff View file |
M | src/common/Project/UGroupManager.class.php | +3 | −5 | Go to diff View file |
M | src/common/Project/UserRemover.php | +29 | −1 | Go to diff View file |
M | src/common/Project/UserRemoverDao.php | +1 | −1 | Go to diff View file |
M | src/common/Request/RouteCollector.php | +3 | −1 | Go to diff View file |
M | src/common/User/SwitchToPresenterBuilder.php | +1 | −1 | Go to diff View file |
M | src/common/admin/ProjectCreation/ProjectVisibility/ProjectVisibilityConfigPresenter.php | +2 | −0 | Go to diff View file |
M | src/common/system_event/SystemEventManager.class.php | +5 | −2 | Go to diff View file |
M | src/common/system_event/include/SystemEvent_PROJECT_IS_PRIVATE.class.php | +17 | −10 | Go to diff View file |
M | src/templates/project/project_visibility.mustache | +5 | −1 | Go to diff View file |
M | src/www/project/admin/editgroupinfo.php | +4 | −2 | Go to diff View file |
M | tests/unit/common/Project/Admin/ProjectVisibilityOptionsForPresenterGeneratorTest.php | +31 | −6 | Go to diff View file |
A | tests/unit/common/Project/Admin/Visibility/UpdateVisibilityCheckerTest.php | +148 | −0 | Go to diff View file |
M | tests/unit/common/Project/ProjectDetails/ProjectDetailsControllerTest.php | +53 | −1 | Go to diff View file |
M | tests/unit/common/Project/UserRemoverTest.php | +77 | −37 | Go to diff View file |
M | tests/unit/common/SystemEvent/SystemEventPROJECTISPRIVATETest.php | +113 | −42 | Go to diff View file |