From 79966027428a7d9e1425c63777647e53c9167066 Mon Sep 17 00:00:00 2001 From: Christian Hofmaier Date: Fri, 10 Aug 2018 00:28:51 +0000 Subject: [permissions] Add recursive group selection + tables changed to search tables Role Table has now a new column recursiveGroups to display if recursive selection is wanted Roles and Permissions can now have longer descriptions Data-Tables are now Udos Search-Tables --- server/migrations/20180726033100-create-role.js | 5 +++- .../migrations/20180726171200-create-permission.js | 2 +- .../20180804234000-create-role_x_group.js | 30 ---------------------- .../20180809013230-create-role_x_group.js | 30 ++++++++++++++++++++++ 4 files changed, 35 insertions(+), 32 deletions(-) delete mode 100644 server/migrations/20180804234000-create-role_x_group.js create mode 100644 server/migrations/20180809013230-create-role_x_group.js (limited to 'server/migrations') diff --git a/server/migrations/20180726033100-create-role.js b/server/migrations/20180726033100-create-role.js index c930148..20736a2 100644 --- a/server/migrations/20180726033100-create-role.js +++ b/server/migrations/20180726033100-create-role.js @@ -12,7 +12,10 @@ module.exports = { type: Sequelize.STRING }, descr: { - type: Sequelize.STRING + type: Sequelize.STRING(2048) + }, + recursiveGroups: { + type: Sequelize.BOOLEAN } }) }, diff --git a/server/migrations/20180726171200-create-permission.js b/server/migrations/20180726171200-create-permission.js index 822e47c..a20ca79 100644 --- a/server/migrations/20180726171200-create-permission.js +++ b/server/migrations/20180726171200-create-permission.js @@ -12,7 +12,7 @@ module.exports = { type: Sequelize.STRING }, descr: { - type: Sequelize.STRING + type: Sequelize.STRING(2048) }, groupdependent: { type: Sequelize.BOOLEAN diff --git a/server/migrations/20180804234000-create-role_x_group.js b/server/migrations/20180804234000-create-role_x_group.js deleted file mode 100644 index a6dd792..0000000 --- a/server/migrations/20180804234000-create-role_x_group.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict' -module.exports = { - up: (queryInterface, Sequelize) => { - return queryInterface.createTable('role_x_group', { - roleId: { - primaryKey: true, - allowNull: false, - type: Sequelize.INTEGER, - onDelete: 'cascade', - references: { - model: 'roles', - key: 'id' - } - }, - groupId: { - primaryKey: true, - allowNull: false, - type: Sequelize.INTEGER, - onDelete: 'cascade', - references: { - model: 'groups', - key: 'id' - } - } - }) - }, - down: (queryInterface, Sequelize) => { - return queryInterface.dropTable('role_x_group') - } -} diff --git a/server/migrations/20180809013230-create-role_x_group.js b/server/migrations/20180809013230-create-role_x_group.js new file mode 100644 index 0000000..a6dd792 --- /dev/null +++ b/server/migrations/20180809013230-create-role_x_group.js @@ -0,0 +1,30 @@ +'use strict' +module.exports = { + up: (queryInterface, Sequelize) => { + return queryInterface.createTable('role_x_group', { + roleId: { + primaryKey: true, + allowNull: false, + type: Sequelize.INTEGER, + onDelete: 'cascade', + references: { + model: 'roles', + key: 'id' + } + }, + groupId: { + primaryKey: true, + allowNull: false, + type: Sequelize.INTEGER, + onDelete: 'cascade', + references: { + model: 'groups', + key: 'id' + } + } + }) + }, + down: (queryInterface, Sequelize) => { + return queryInterface.dropTable('role_x_group') + } +} -- cgit v1.2.3-55-g7522