stable

Clone or download

Read-only

Git smart http routed by FrontRouter

Take the opportunity to go a little bit deeper in the FrontRouting with more complex routes (complex regexp to indentify Smart HTTP requests) in addition to low level permission handling. For permission handling, we introduce a new Interface that completly disable the existing mechanism "URLVerification". It's the common protection that forbid access to private projects, restricted users & co. It was previously managed by a dedicated hook in URLVerification that "whitelisted" URLs so permissions were handled later in the stack. With this new approach we make clear the requests that implement the new interface are "on their own" and developer has to deal with all permission and authentication checking manually. Part of request #11450 FrontRouter for git plugin Change-Id: Icb2473a5fe5241e16ec828a68c44dd50ff383d80

Modified Files

Name
M plugins/git/include/Git.class.php +0 −40 Go to diff View file
M plugins/git/include/Git/HTTP/CommandFactory.class.php +9 −127 Go to diff View file
A plugins/git/include/Git/HTTP/HTTPAccessControl.php +141 −0 Go to diff View file
A plugins/git/include/Git/HTTP/HTTPController.php +159 −0 Go to diff View file
M plugins/git/include/Git/URL.class.php +0 −4 Go to diff View file
M plugins/git/include/autoload.php +4 −2 Go to diff View file
M plugins/git/include/gitPlugin.class.php +11 −19 Go to diff View file
A plugins/git/phpunit/GitRoutingTest.php +106 −0 Go to diff View file
M plugins/git/site-content/fr_FR/LC_MESSAGES/tuleap-git.po +6 −1 Go to diff View file
M plugins/git/site-content/tuleap-git.pot +6 −0 Go to diff View file
M plugins/git/tests/Git/URLTest.php +0 −49 Go to diff View file
M src/common/Request/DispatchableWithRequest.php +1 −0 Go to diff View file
A src/common/Request/DispatchableWithRequestNoAuthz.php +49 −0 Go to diff View file
M src/common/Request/FrontRouter.php +25 −8 Go to diff View file
M src/common/autoload.php +3 −2 Go to diff View file
M src/common/include/URLVerificationFactory.class.php +12 −15 Go to diff View file
M src/www/include/pre.php +5 −3 Go to diff View file
M src/www/index.php +3 −1 Go to diff View file
M tests/phpunit/phpunit.xml +1 −0 Go to diff View file
M tests/simpletest/common/include/URLVerificationFactoryTest.php +22 −42 Go to diff View file