Compact contour actions and delete VPS applications with all access
Device Core qualification / qualify (push) Successful in 7m19s
Device Core qualification / qualify (push) Successful in 7m19s
This commit is contained in:
@@ -179,7 +179,7 @@ export class B2Infrastructure {
|
||||
// Host management can affect all projects of the company. A project-only
|
||||
// grant must not turn into company-wide administration.
|
||||
if (action !== 'devices') assertActorCanManageOwnerScope(actor, { scopeKind: project.scope_kind, ownerRef: project.owner_ref });
|
||||
if (['connect', 'key-issue', 'key-revoke', 'application-connect'].includes(action)) {
|
||||
if (['connect', 'key-issue', 'key-revoke', 'application-connect', 'application-delete'].includes(action)) {
|
||||
await findProjectWithCapability(db, actor, projectId, 'credential.manage');
|
||||
}
|
||||
const host = (await db.query('select id,host_key,display_name,provider_ref from device_infrastructure_hosts where id=$1 and project_id=$2 and lifecycle_state <> $3 for share',
|
||||
@@ -286,6 +286,9 @@ export class B2Infrastructure {
|
||||
result = { id: app.id, connection: await remote.call('/v2/management/credentials', {
|
||||
integration_id: app.id, replace: false, request_id: requestId,
|
||||
}) };
|
||||
} else if (action === 'application-delete') {
|
||||
fields(input, ['integrationId']);
|
||||
result = await remote.call('/v2/management/applications/delete', { integration_id: opaque(input.integrationId) });
|
||||
} else if (action === 'key-issue') {
|
||||
fields(input, ['integrationId', 'replace']);
|
||||
if (typeof input.replace !== 'boolean') throw b2Error('b2_replace_invalid');
|
||||
|
||||
Reference in New Issue
Block a user