OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Check :show_github_content permission on the work package
Klaus Zanders28adc2ea17d6
diff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rbindex 725da18adc7..7839e45b81a 100644--- a/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rb+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rb@@ -31,7 +31,7 @@ module APImodule GithubPullRequestsclass GithubPullRequestsByWorkPackageAPI < ::API::OpenProjectAPIafter_validation do- authorize_in_project(:show_github_content, project: @work_package.project)+ authorize_in_work_package(:show_github_content, work_package: @work_package)@github_pull_requests = @work_package.github_pull_requestsenddiff --git a/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb b/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rbindex c8b48ef5149..1b293065939 100644--- a/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb+++ b/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb@@ -7,7 +7,7 @@ module OpenProject::GithubIntegrationdef extension->(*) dolink :github,- cache_if: -> { current_user.allowed_in_project?(:show_github_content, represented.project) } do+ cache_if: -> { current_user.allowed_in_work_package?(:show_github_content, represented) } do{href: "#{work_package_path(id: represented.id)}/tabs/github",title: "github"