Skip to content

Commit

Permalink
feat(xo-server): add license check for backup mirror
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeauchamp committed May 24, 2023
1 parent 0045995 commit 3113c47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/xo-server/src/xo-mixins/authorization.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const AUTHORIZATIONS = {
FULL: STARTER,
HEALTHCHECK: ENTERPRISE,
METADATA: ENTERPRISE,
MIRROR: ENTERPRISE,
WITH_RAM: ENTERPRISE,
SMART_BACKUP: ENTERPRISE,
S3: STARTER,
Expand Down
4 changes: 4 additions & 0 deletions packages/xo-server/src/xo-mixins/backups-ng/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,10 @@ export default class BackupNg {
return
}

if (job.type === 'mirrorBackup') {
await app.checkFeatureAuthorization('BACKUP.MIRROR')
}

if (job.mode === 'full') {
await app.checkFeatureAuthorization('BACKUP.FULL')
}
Expand Down

0 comments on commit 3113c47

Please sign in to comment.