mirror of
https://github.com/tiennm99/coolify.git
synced 2026-07-25 18:18:57 +00:00
fix(github): allow system-wide private apps across teams
Use the shared GitHub app scope when listing and loading private apps so system-wide apps owned by another team remain available. Update coverage for mounting and loading repositories through those apps.
This commit is contained in:
@@ -71,7 +71,7 @@ class GithubPrivateRepository extends Component
|
||||
$this->parameters = get_route_parameters();
|
||||
$this->query = request()->query();
|
||||
$this->repositories = $this->branches = collect();
|
||||
$this->github_apps = GithubApp::where('team_id', currentTeam()->id)
|
||||
$this->github_apps = GithubApp::ownedByCurrentTeam()
|
||||
->where('is_public', false)
|
||||
->whereNotNull('app_id')
|
||||
->get();
|
||||
@@ -106,7 +106,7 @@ class GithubPrivateRepository extends Component
|
||||
$this->total_branches_count = 0;
|
||||
$this->page = 1;
|
||||
$this->selected_github_app_id = $github_app_id;
|
||||
$this->github_app = GithubApp::where('team_id', currentTeam()->id)
|
||||
$this->github_app = GithubApp::ownedByCurrentTeam()
|
||||
->where('is_public', false)
|
||||
->whereNotNull('app_id')
|
||||
->findOrFail($github_app_id);
|
||||
|
||||
Reference in New Issue
Block a user