Skip to content

Commit

Permalink
migration: add permissions for instance maintenance (#8885)
Browse files Browse the repository at this point in the history
after #8875
  • Loading branch information
Tymek authored Dec 12, 2024
1 parent 1008f9d commit 67864e7
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/migrations/20241212122149-add-permissions-maintenance.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'use strict';

exports.up = function (db, cb) {
db.runSql(`
INSERT INTO permissions (permission, display_name, type) VALUES ('UPDATE_MAINTENANCE_MODE', 'Change maintenance mode state', 'root');
INSERT INTO permissions (permission, display_name, type) VALUES ('UPDATE_INSTANCE_BANNERS', 'Change instance banners', 'root');
`, cb);
}

exports.down = function (db, cb) {
db.runSql(`
DELETE FROM permissions WHERE permission IN ('UPDATE_MAINTENANCE_MODE', 'UPDATE_INSTANCE_BANNERS');
`, cb);
}

0 comments on commit 67864e7

Please sign in to comment.