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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user