From e70f02a2496fd47f7f212eea0692fcd91a10b440 Mon Sep 17 00:00:00 2001 From: Tymoteusz Czech <2625371+Tymek@users.noreply.github.com> Date: Mon, 16 Dec 2024 17:00:56 +0100 Subject: [PATCH] migration: add auth config permission --- .../20241216141201-add-permission-auth-config.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/migrations/20241216141201-add-permission-auth-config.js diff --git a/src/migrations/20241216141201-add-permission-auth-config.js b/src/migrations/20241216141201-add-permission-auth-config.js new file mode 100644 index 000000000000..33ce044d973c --- /dev/null +++ b/src/migrations/20241216141201-add-permission-auth-config.js @@ -0,0 +1,13 @@ +'use strict'; + +exports.up = function (db, cb) { + db.runSql(` + INSERT INTO permissions (permission, display_name, type) VALUES ('UPDATE_AUTH_CONFIGURATION', 'Change authentication settings (SSO)', 'root'); + `, cb); +} + +exports.down = function (db, cb) { + db.runSql(` + DELETE FROM permissions WHERE permission IN ('UPDATE_AUTH_CONFIGURATION'); + `, cb); +}