fix: access team's github apps only
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -9,6 +9,11 @@ class GitlabApp extends BaseModel
|
||||
'app_secret',
|
||||
];
|
||||
|
||||
public static function ownedByCurrentTeam()
|
||||
{
|
||||
return GitlabApp::whereTeamId(currentTeam()->id);
|
||||
}
|
||||
|
||||
public function applications()
|
||||
{
|
||||
return $this->morphMany(Application::class, 'source');
|
||||
|
||||
Reference in New Issue
Block a user