forked from External/greenlight
GRN2-176: Create a role editor that allows admins to specify what permissions each role has (#709)
* Add roles editor * Add colour selection ability to roles * Add ability to assign roles to users in the UI * Remove rolify and replace it with our own custom roles implemenation * - Fix all existing roles functionality - Fix super admins * Fix bugs with new customers not have default roles * Add can't create room setting * Code improvements * Fix migration * Add tests for new methods * Translate reserved role names * Pull roles from saml/ldap * Fix rspec * Fix scrutinizer issues * Fix email promoted/demoted tests * Apply comments * Redirect directly to the main room * Add comments
This commit is contained in:
committed by
Jesus Federico
parent
02b342b157
commit
4fc1714db8
100
db/schema.rb
100
db/schema.rb
@ -10,53 +10,59 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema.define(version: 20190711192033) do
|
||||
ActiveRecord::Schema.define(version: 2019_07_26_153012) do
|
||||
|
||||
create_table "features", force: :cascade do |t|
|
||||
t.integer "setting_id"
|
||||
t.string "name", null: false
|
||||
t.string "value"
|
||||
t.boolean "enabled", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "setting_id"
|
||||
t.string "name", null: false
|
||||
t.string "value"
|
||||
t.boolean "enabled", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["name"], name: "index_features_on_name"
|
||||
t.index ["setting_id"], name: "index_features_on_setting_id"
|
||||
end
|
||||
|
||||
create_table "invitations", force: :cascade do |t|
|
||||
t.string "email", null: false
|
||||
t.string "provider", null: false
|
||||
t.string "invite_token"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "email", null: false
|
||||
t.string "provider", null: false
|
||||
t.string "invite_token"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["invite_token"], name: "index_invitations_on_invite_token"
|
||||
t.index ["provider"], name: "index_invitations_on_provider"
|
||||
end
|
||||
|
||||
create_table "roles", force: :cascade do |t|
|
||||
t.string "name"
|
||||
t.string "resource_type"
|
||||
t.integer "resource_id"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["name", "resource_type", "resource_id"], name: "index_roles_on_name_and_resource_type_and_resource_id"
|
||||
t.string "name"
|
||||
t.integer "priority", default: 9999
|
||||
t.boolean "can_create_rooms", default: false
|
||||
t.boolean "send_promoted_email", default: false
|
||||
t.boolean "send_demoted_email", default: false
|
||||
t.boolean "can_edit_site_settings", default: false
|
||||
t.boolean "can_edit_roles", default: false
|
||||
t.boolean "can_manage_users", default: false
|
||||
t.string "colour"
|
||||
t.string "provider"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["name", "provider"], name: "index_roles_on_name_and_provider", unique: true
|
||||
t.index ["name"], name: "index_roles_on_name"
|
||||
t.index ["resource_type", "resource_id"], name: "index_roles_on_resource_type_and_resource_id"
|
||||
end
|
||||
|
||||
create_table "rooms", force: :cascade do |t|
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.string "uid"
|
||||
t.string "bbb_id"
|
||||
t.integer "sessions", default: 0
|
||||
t.integer "user_id"
|
||||
t.string "name"
|
||||
t.string "uid"
|
||||
t.string "bbb_id"
|
||||
t.integer "sessions", default: 0
|
||||
t.datetime "last_session"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "room_settings", default: "{ }"
|
||||
t.string "moderator_pw"
|
||||
t.string "attendee_pw"
|
||||
t.string "access_code"
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "room_settings", default: "{ }"
|
||||
t.string "moderator_pw"
|
||||
t.string "attendee_pw"
|
||||
t.string "access_code"
|
||||
t.index ["bbb_id"], name: "index_rooms_on_bbb_id"
|
||||
t.index ["last_session"], name: "index_rooms_on_last_session"
|
||||
t.index ["name"], name: "index_rooms_on_name"
|
||||
@ -66,30 +72,30 @@ ActiveRecord::Schema.define(version: 20190711192033) do
|
||||
end
|
||||
|
||||
create_table "settings", force: :cascade do |t|
|
||||
t.string "provider", null: false
|
||||
t.string "provider", null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.index ["provider"], name: "index_settings_on_provider"
|
||||
end
|
||||
|
||||
create_table "users", force: :cascade do |t|
|
||||
t.integer "room_id"
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.string "name"
|
||||
t.string "username"
|
||||
t.string "email"
|
||||
t.string "social_uid"
|
||||
t.string "image"
|
||||
t.string "password_digest"
|
||||
t.boolean "accepted_terms", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.boolean "email_verified", default: false
|
||||
t.string "language", default: "default"
|
||||
t.string "reset_digest"
|
||||
t.integer "room_id"
|
||||
t.string "provider"
|
||||
t.string "uid"
|
||||
t.string "name"
|
||||
t.string "username"
|
||||
t.string "email"
|
||||
t.string "social_uid"
|
||||
t.string "image"
|
||||
t.string "password_digest"
|
||||
t.boolean "accepted_terms", default: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.boolean "email_verified", default: false
|
||||
t.string "language", default: "default"
|
||||
t.string "reset_digest"
|
||||
t.datetime "reset_sent_at"
|
||||
t.string "activation_digest"
|
||||
t.string "activation_digest"
|
||||
t.datetime "activated_at"
|
||||
t.index ["created_at"], name: "index_users_on_created_at"
|
||||
t.index ["email"], name: "index_users_on_email"
|
||||
|
Reference in New Issue
Block a user