fix: access team's github apps only

This commit is contained in:
Andras Bacsai
2024-10-24 13:28:31 +02:00
parent 23f7932964
commit bdf9b98596
3 changed files with 54 additions and 41 deletions

View File

@@ -31,6 +31,11 @@ class GithubApp extends BaseModel
});
}
public static function ownedByCurrentTeam()
{
return GithubApp::whereTeamId(currentTeam()->id);
}
public static function public()
{
return GithubApp::whereTeamId(currentTeam()->id)->whereisPublic(true)->whereNotNull('app_id')->get();