Add backup policy migration support

This commit is contained in:
Prem Palanisamy
2026-03-12 13:41:00 +00:00
parent 64dc730a3b
commit 065a0fddae
+34 -26
View File
@@ -309,6 +309,39 @@ class Migrations extends Action
);
}
/**
* @return array<string>
*/
protected function getAPIKeyScopes(): array
{
return [
'users.read',
'users.write',
'teams.read',
'teams.write',
'buckets.read',
'buckets.write',
'files.read',
'files.write',
'functions.read',
'functions.write',
'sites.read',
'sites.write',
'tokens.read',
'tokens.write',
'providers.read',
'providers.write',
'topics.read',
'topics.write',
'subscribers.read',
'subscribers.write',
'messages.read',
'messages.write',
'targets.read',
'targets.write',
];
}
/**
* @throws Exception
*/
@@ -329,32 +362,7 @@ class Migrations extends Action
METRIC_NETWORK_INBOUND,
METRIC_NETWORK_OUTBOUND,
],
'scopes' => [
'users.read',
'users.write',
'teams.read',
'teams.write',
'buckets.read',
'buckets.write',
'files.read',
'files.write',
'functions.read',
'functions.write',
'sites.read',
'sites.write',
'tokens.read',
'tokens.write',
'providers.read',
'providers.write',
'topics.read',
'topics.write',
'subscribers.read',
'subscribers.write',
'messages.read',
'messages.write',
'targets.read',
'targets.write',
]
'scopes' => $this->getAPIKeyScopes()
]);
return API_KEY_DYNAMIC . '_' . $apiKey;