stable

Clone or download

Read-only

Add a read only OAuth2 scope to access tracker information

It is now possible to request the scope 'read:tracker' in the authorization request to get access to REST API of the trackers (and to the information they contains) in a read only mode. The primary goal of the contribution is to introduce the remaining building blocks to make the introduction of new OAuth2 scopes trivial in the future. Part of story #14542: have OAuth2 flow Change-Id: Ife8ff979a697ae9a9ea7f627eb47930b46846e41

Modified Files

Name
M plugins/oauth2_server/include/oauth2_serverPlugin.php +16 −4 Go to diff View file
M plugins/tracker/include/REST/Artifact/UsersArtifactsResource.php +1 −0 Go to diff View file
A plugins/tracker/include/REST/OAuth2/OAuth2TrackerReadScope.php +99 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactFilesResource.class.php +1 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactTemporaryFilesResource.class.php +2 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ArtifactsResource.class.php +5 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ProjectTrackersResource.class.php +1 −0 Go to diff View file
M plugins/tracker/include/REST/v1/ReportsResource.class.php +2 −0 Go to diff View file
M plugins/tracker/include/REST/v1/TrackersResource.class.php +4 −0 Go to diff View file
M plugins/tracker/include/REST/v1/Workflow/TransitionsResource.class.php +2 −0 Go to diff View file
M plugins/tracker/include/trackerPlugin.php +13 −0 Go to diff View file
A plugins/tracker/phpunit/REST/OAuth2/OAuth2TrackerReadScopeTest.php +33 −0 Go to diff View file
M plugins/tracker/site-content/fr_FR/LC_MESSAGES/tuleap-tracker.po +6 −0 Go to diff View file
M src/common/REST/UserManager.class.php +6 −4 Go to diff View file
A src/common/User/OAuth2/Scope/CoreOAuth2ScopeBuilderFactory.php +40 −0 Go to diff View file
A src/common/User/OAuth2/Scope/OAuth2ScopeBuilderCollector.php +46 −0 Go to diff View file
A tests/phpunit/common/User/OAuth2/Scope/CoreOAuth2ScopeBuilderFactoryTest.php +37 −0 Go to diff View file
A tests/phpunit/common/User/OAuth2/Scope/OAuth2ScopeBuilderCollectorTest.php +65 −0 Go to diff View file