1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

migration: add permissions for instance maintenance (#8885)

after #8875
This commit is contained in:
Tymoteusz Czech 2024-12-12 16:53:46 +01:00 committed by GitHub
parent 1008f9d105
commit 67864e7008
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);
}