Fixed GitLab admin not seeing merge requests
What does this MR do?
This would allow GitLab admin users to see merge requests in Jira Panel Development Integration to projects he doesn't belong to.
Before this fix:
$ curl --header "PRIVATE-TOKEN: <admin-not-belonging-to-project>" -A "JIRA DVCS Connector/5.1.3" https://jdasmarinas-omnibus.do.gitlap.com/api/v3/repos/root/junittest/pulls/1
{"message":"404 Not Found"}
After this fix:
$ curl --header "PRIVATE-TOKEN: <admin-not-belonging-to-project>" -A "JIRA DVCS Connector/5.1.3" https://jdasmarinas-omnibus.do.gitlap.com/api/v3/repos/root/junittest/pulls/1
{"title":"New feature","assignee":null,"user":{"id":1,"login":"root","url":"https://jdasmarinas-omnibus.do.gitlap.com/root","html_url":"https://jdasmarinas-omnibus.do.gitlap.com/root","avatar_url":"https://secure.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80\u0026d=identicon"},"created_at":"2019-11-28T01:36:11.407Z","body":"","number":1,"state":"open","merged":false,"merged_at":null,"closed_at":null,"updated_at":"2019-11-28T01:36:11.407Z","html_url":"https://jdasmarinas-omnibus.do.gitlap.com/root/junittest/merge_requests/1","head":{"label":"new-feature","ref":"new-feature","repo":{"id":86,"owner":{"login":"root"},"name":"junittest"}},"base":{"label":"master","ref":"master","repo":{"id":86,"owner":{"login":"root"},"name":"junittest"}}}
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by 🤖 GitLab Bot 🤖