feat: Support create, read, delete variables in Public API (#10241)

This commit is contained in:
Iván Ovejero
2024-07-30 14:58:07 +02:00
committed by GitHub
parent f87854f8db
commit af695ebf93
11 changed files with 345 additions and 1 deletions

View File

@@ -78,7 +78,11 @@ export async function createUserWithMfaEnabled(
};
}
export async function createOwner() {
export async function createOwner({ withApiKey } = { withApiKey: false }) {
if (withApiKey) {
return await addApiKey(await createUser({ role: 'global:owner' }));
}
return await createUser({ role: 'global:owner' });
}