diff --git a/dashboard/public/views/app.html b/dashboard/public/views/app.html index 669d52ce3..8c0d1b9c3 100644 --- a/dashboard/public/views/app.html +++ b/dashboard/public/views/app.html @@ -1740,7 +1740,7 @@
{{ 'app.archive.description' | tr }}
diff --git a/src/apps.js b/src/apps.js index 399071f2c..6946f4777 100644 --- a/src/apps.js +++ b/src/apps.js @@ -2491,6 +2491,8 @@ async function archive(app, backupId, auditSource) { assert.strictEqual(typeof backupId, 'string'); assert.strictEqual(typeof auditSource, 'object'); + if (app.manifest.id === constants.PROXY_APP_APPSTORE_ID) throw new BoxError(BoxError.BAD_FIELD, 'cannot archive proxy app'); + const result = await backups.getByIdentifierAndStatePaged(app.id, backups.BACKUP_STATE_NORMAL, 1, 1); if (result.length === 0) throw new BoxError(BoxError.BAD_STATE, 'No recent backup to archive'); if (result[0].id !== backupId) throw new BoxError(BoxError.BAD_STATE, 'Latest backup id has changed');