stable

Clone or download

Read-only

Controllers can inform about the current project

There is an automated control of private project / restricted users made by URLVerification in tuleap based on 'group_id' parameter in URL. Until now, when no group_id was provided, an event was sent to let implementors provide the id if they recognize an URL intended for them. It both complex (group_id automagically generated somewhere) and inefficient as the URI is parsed several times to finally be associated to the right plugin. With this contribution, a controller associated to a Route can return the project it's working on and bypass the event stuff. Part of story #10408 have a burning parrot git repository list Change-Id: I1693974d6c6299b93c738fcffb89bd1ca1adafe4

Modified Files

Name
M plugins/git/include/Git/RepositoryList/GitRepositoryListController.php +26 −12 Go to diff View file
M plugins/git/include/Git/URL.class.php +0 −6 Go to diff View file
M plugins/webdav/include/Webdav_URLVerification.class.php +1 −1 Go to diff View file
A src/common/Request/DispatchableWithProject.php +38 −0 Go to diff View file
M src/common/Request/FrontRouter.php +8 −1 Go to diff View file
M src/common/autoload.php +3 −2 Go to diff View file
M src/common/error/Error_PermissionDenied.class.php +6 −9 Go to diff View file
M src/common/event/Event.class.php +3 −0 Go to diff View file
M src/common/include/URLVerification.class.php +31 −16 Go to diff View file
A tests/phpunit/common/Include/URLVerification_AssertValidUrlTest.php +172 −0 Go to diff View file
M tests/phpunit/common/Request/FrontRouterTest.php +61 −3 Go to diff View file
M tests/simpletest/common/include/URLVerificationTest.php +17 −183 Go to diff View file