stable
Clone or download
The role of the PFUser class is to hold user informations but it also used to keep the "logged in" state per request. Mixing the two together is a source issues when you start to have different way to be "logged in" as Tuleap currently do because this is not determined by the user informations but by informations transported by the currently processed request. As a result, REST calls might incorrectly consider a user as not logged in when in fact it has been properly authenticated. Note this contribution does not solve the issue completly, methods like `getSessionHash`, `getSessionId` and `isAnonymous` should also be removed/moved out but at least we know have a proper and accurate way to determine if the current user is logged in. Part of story #26042: install mediawiki standalone Change-Id: I8090a29450ea20e809b5c95cc753d35e141cfc2d
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/dynamic_credentials/include/User/DynamicUser.php | +1 | −6 | Go to diff View file |
M | plugins/dynamic_credentials/tests/unit/User/DynamicUserCreatorTest.php | +4 | −4 | Go to diff View file |
M | plugins/forumml/include/ForumML/ListInfoFromVariablesProvider.php | +1 | −1 | Go to diff View file |
M | plugins/forumml/include/ForumML/Threads/ThreadsPresenterBuilder.php | +1 | −1 | Go to diff View file |
M | plugins/forumml/tests/unit/ForumML/ListInfoFromVariablesProviderTest.php | +5 | −5 | Go to diff View file |
M | plugins/forumml/tests/unit/ForumML/Threads/ThreadsControllerTest.php | +5 | −5 | Go to diff View file |
M | plugins/mediawiki/www/LocalSettings.php | +4 | −3 | Go to diff View file |
M | plugins/mfa/include/Enrollment/EnrollmentDisplayController.php | +1 | −1 | Go to diff View file |
M | plugins/mfa/include/Enrollment/EnrollmentRegisterController.php | +1 | −1 | Go to diff View file |
M | plugins/mfa/include/Enrollment/TrialAuthenticationDisplayController.php | +1 | −1 | Go to diff View file |
M | plugins/mfa/include/Enrollment/TrialAuthenticationVerifierController.php | +1 | −1 | Go to diff View file |
M | plugins/openidconnectclient/include/OpenIDConnectClient/Login/Controller.php | +3 | −3 | Go to diff View file |
M | plugins/pullrequest/include/pullrequestPlugin.php | +1 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/Explorer/RepositoryDisplayController.php | +3 | −1 | Go to diff View file |
M | plugins/svn/include/SVN/ViewVC/ViewVCProxy.php | +10 | −9 | Go to diff View file |
M | plugins/svn/include/svnPlugin.php | +2 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/ActionButtons/ArtifactCopyButtonPresenterBuilder.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Artifact.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/MailGateway/MailGateway.class.php | +3 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Presenter/EditArtifactInPlacePresenter.php | +3 | −7 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Renderer/EditInPlaceRenderer.class.php | +4 | −3 | Go to diff View file |
M | plugins/tracker/include/Tracker/Artifact/Tracker_Artifact_Changeset.class.php | +7 | −6 | Go to diff View file |
M | plugins/tracker/include/Tracker/Creation/JiraImporter/JiraRunner.php | +2 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/FormElement/Tracker_FormElement_Container_Fieldset.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Notifications/Settings/NotificationsUserSettingsDisplayController.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Notifications/Settings/NotificationsUserSettingsUpdateController.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_Report.class.php | +3 | −3 | Go to diff View file |
M | plugins/tracker/include/Tracker/Report/Tracker_Report_Renderer.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/include/Tracker/Tracker.class.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/Creation/JiraImporter/JiraRunnerTest.php | +0 | −6 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/FormElement/Field/Burndown/BurndownDataBuilderForLegacyTest.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/FormElement/Field/Burndown/BurndownDataBuilderForRESTTest.php | +1 | −1 | Go to diff View file |
M | plugins/tracker/tests/unit/Tracker/Report/Tracker_Report_Renderer_TableTest.php | +1 | −1 | Go to diff View file |
M | src/common/Dashboard/User/UserDashboardRouter.php | +1 | −1 | Go to diff View file |
M | src/common/Dashboard/Widget/WidgetDashboardController.php | +1 | −1 | Go to diff View file |
M | src/common/Error/PermissionDeniedPrivateProjectController.php | +2 | −2 | Go to diff View file |
M | src/common/Error/PermissionDeniedRestrictedAccountController.php | +2 | −1 | Go to diff View file |
M | src/common/Error/PermissionDeniedRestrictedAccountProjectController.php | +2 | −1 | Go to diff View file |
M | src/common/Error/ProjectAccessSuspendedController.php | +2 | −2 | Go to diff View file |
M | src/common/Layout/BaseLayout.php | +4 | −3 | Go to diff View file |
M | src/common/Layout/ProjectSidebar/ProjectSidebarConfigRepresentation.php | +6 | −5 | Go to diff View file |
M | src/common/Layout/ProjectSidebar/User/ProjectSidebarUser.php | +4 | −3 | Go to diff View file |
M | src/common/Layout/ThemeManager.class.php | +4 | −4 | Go to diff View file |
M | src/common/MailingList/MailingListHomepageController.php | +1 | −1 | Go to diff View file |
M | src/common/Project/Admin/Access/UserCanAccessProjectAdministrationVerifier.php | +4 | −2 | Go to diff View file |
M | src/common/Project/Admin/Access/VerifyUserCanAccessProjectAdministration.php | +3 | −1 | Go to diff View file |
M | src/common/Project/Project_SOAPServer.class.php | +3 | −3 | Go to diff View file |
M | src/common/Project/REST/v1/ProjectResource.class.php | +3 | −3 | Go to diff View file |
M | src/common/REST/BasicAuthentication.class.php | +2 | −1 | Go to diff View file |
M | src/common/REST/UserManager.class.php | +2 | −1 | Go to diff View file |
M | src/common/Request/FrontRouter.php | +12 | −10 | Go to diff View file |
M | src/common/SVNCore/intro/SVN_IntroPresenter.php | +8 | −12 | Go to diff View file |
A | src/common/User/CurrentUserWithLoggedInInformation.php | +46 | −0 | Go to diff View file |
M | src/common/User/LoginManager.class.php | +1 | −1 | Go to diff View file |
A | src/common/User/ProvideAnonymousUser.php | +28 | −0 | Go to diff View file |
A | src/common/User/ProvideCurrentUserWithLoggedInInformation.php | +28 | −0 | Go to diff View file |
M | src/common/User/SwitchToPresenterBuilder.php | +4 | −2 | Go to diff View file |
M | src/common/User/User.class.php | +0 | −5 | Go to diff View file |
M | src/common/User/UserManager.class.php | +41 | −39 | Go to diff View file |
M | src/common/User/User_SOAPServer.class.php | +3 | −3 | Go to diff View file |
M | src/common/include/TimezoneRetriever.php | +1 | −1 | Go to diff View file |
M | src/common/include/Toggler.class.php | +5 | −25 | Go to diff View file |
M | src/common/include/URLVerification.class.php | +27 | −32 | Go to diff View file |
M | src/common/soap/SOAPRequestValidatorImplementation.php | +3 | −3 | Go to diff View file |
M | src/common/soap/SOAP_UserManager.class.php | +3 | −3 | Go to diff View file |
M | src/common/tracker/Artifact.class.php | +6 | −4 | Go to diff View file |
M | src/common/wiki/views/WikiServiceViews.class.php | +1 | −1 | Go to diff View file |
M | src/themes/BurningParrot/include/BurningParrotTheme.php | +19 | −23 | Go to diff View file |
M | src/themes/BurningParrot/include/HeaderPresenterBuilder.php | +5 | −9 | Go to diff View file |
M | src/themes/BurningParrot/include/Navbar/PresenterBuilder.php | +6 | −11 | Go to diff View file |
M | src/themes/BurningParrot/include/Navbar/UserNavPresenter.php | +7 | −11 | Go to diff View file |
M | src/themes/BurningParrot/include/ProjectSidebarPresenter.php | +3 | −3 | Go to diff View file |
M | src/themes/FlamingParrot/include/NavBarPresenter.class.php | +13 | −18 | Go to diff View file |
M | src/www/account/login.php | +11 | −10 | Go to diff View file |
M | src/www/include/pre.php | +1 | −1 | Go to diff View file |
M | src/www/include/session.php | +2 | −2 | Go to diff View file |
M | src/www/include/user.php | +5 | −6 | Go to diff View file |
M | src/www/index.php | +2 | −1 | Go to diff View file |
M | src/www/soap/common/session.php | +6 | −4 | Go to diff View file |
M | src/www/svn/svn_intro.php | +3 | −3 | Go to diff View file |
M | src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php | +16 | −16 | Go to diff View file |
M | tests/lib/Stubs/VerifyUserCanAccessProjectAdministrationStub.php | +2 | −1 | Go to diff View file |
M | tests/rest/tests/ArtifactsTest.php | +10 | −10 | Go to diff View file |
M | tests/unit/common/Include/URLVerification_AssertValidUrlTest.php | +3 | −1 | Go to diff View file |
M | tests/unit/common/Include/UrlVerification/URLVerificationExpiredPasswordTest.php | +2 | −1 | Go to diff View file |
M | tests/unit/common/Include/UrlVerification/URLVerificationPermissionsOverriderAnonymousPlatformTest.php | +5 | −5 | Go to diff View file |
M | tests/unit/common/Include/UrlVerification/URLVerificationPermissionsOverriderRegularPlatformTest.php | +3 | −10 | Go to diff View file |
M | tests/unit/common/Include/UrlVerification/URLVerificationPermissionsOverriderRestrictedPlatformTest.php | +5 | −10 | Go to diff View file |
M | tests/unit/common/Include/UrlVerification/URLVerificationWithAnonymousTest.php | +26 | −15 | Go to diff View file |
M | tests/unit/common/Layout/ProjectSidebar/ProjectSidebarConfigRepresentationTest.php | +3 | −2 | Go to diff View file |
M | tests/unit/common/Project/Admin/Access/UserCanAccessProjectAdministrationVerifierTest.php | +15 | −10 | Go to diff View file |
M | tests/unit/common/Project/SOAPServerProjectDescriptionFieldsTest.php | +7 | −7 | Go to diff View file |
M | tests/unit/common/Project/SOAPServerProjectServicesUsageTest.php | +8 | −8 | Go to diff View file |
M | tests/unit/common/Request/FrontRouterTest.php | +12 | −11 | Go to diff View file |
M | tests/unit/common/SOAP/SOAPRequestValidatorImplementationTest.php | +9 | −5 | Go to diff View file |
A | tests/unit/common/User/CurrentUserWithLoggedInInformationTest.php | +53 | −0 | Go to diff View file |
M | tests/unit/common/User/SwitchToPresenterBuilderTest.php | +8 | −9 | Go to diff View file |
M | tests/unit/common/User/User_LoginManagerTest.php | +3 | −3 | Go to diff View file |
M | tests/unit/common/User/User_SOAPServerTest.php | +12 | −8 | Go to diff View file |
A | tests/unit/tests/User/AnonymousUserTestProvider.php | +34 | −0 | Go to diff View file |