fix(databases): update backup retrieval logic to include team context

- Modified backup configuration queries in the DatabasesController to filter by team ID, ensuring proper access control.
- Enhanced S3 storage retrieval to use the current team context for better data integrity.
- Added a relationship method in ScheduledDatabaseBackup model to associate backups with teams.
This commit is contained in:
Andras Bacsai
2025-09-22 17:44:26 +02:00
parent ed2ba832a8
commit 5c6ab50332
2 changed files with 11 additions and 5 deletions

View File

@@ -10,6 +10,11 @@ class ScheduledDatabaseBackup extends BaseModel
{
protected $guarded = [];
public function team()
{
return $this->belongsTo(Team::class);
}
public function database(): MorphTo
{
return $this->morphTo();