From ed9f00178c65cc4b37ad2ab56cc89b1c79c4fb8b Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 31 May 2015 07:16:23 +0000 Subject: Ability to limit member management to certain roles (#19707). git-svn-id: http://svn.redmine.org/redmine/trunk@14293 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- db/migrate/20150528084820_add_roles_all_roles_managed.rb | 5 +++++ db/migrate/20150528092912_create_roles_managed_roles.rb | 8 ++++++++ .../20150528093249_add_unique_index_on_roles_managed_roles.rb | 5 +++++ 3 files changed, 18 insertions(+) create mode 100644 db/migrate/20150528084820_add_roles_all_roles_managed.rb create mode 100644 db/migrate/20150528092912_create_roles_managed_roles.rb create mode 100644 db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb (limited to 'db') diff --git a/db/migrate/20150528084820_add_roles_all_roles_managed.rb b/db/migrate/20150528084820_add_roles_all_roles_managed.rb new file mode 100644 index 000000000..c4e2b9b17 --- /dev/null +++ b/db/migrate/20150528084820_add_roles_all_roles_managed.rb @@ -0,0 +1,5 @@ +class AddRolesAllRolesManaged < ActiveRecord::Migration + def change + add_column :roles, :all_roles_managed, :boolean, :default => true, :null => false + end +end diff --git a/db/migrate/20150528092912_create_roles_managed_roles.rb b/db/migrate/20150528092912_create_roles_managed_roles.rb new file mode 100644 index 000000000..94e5ee2d8 --- /dev/null +++ b/db/migrate/20150528092912_create_roles_managed_roles.rb @@ -0,0 +1,8 @@ +class CreateRolesManagedRoles < ActiveRecord::Migration + def change + create_table :roles_managed_roles, :id => false do |t| + t.integer :role_id, :null => false + t.integer :managed_role_id, :null => false + end + end +end diff --git a/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb b/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb new file mode 100644 index 000000000..74dc64b38 --- /dev/null +++ b/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb @@ -0,0 +1,5 @@ +class AddUniqueIndexOnRolesManagedRoles < ActiveRecord::Migration + def change + add_index :roles_managed_roles, [:role_id, :managed_role_id], :unique => true + end +end -- cgit v1.2.3