diff --git a/app/models/role.rb b/app/models/role.rb index 61177a05..124bcd8e 100644 --- a/app/models/role.rb +++ b/app/models/role.rb @@ -20,7 +20,7 @@ class Role < ApplicationRecord has_and_belongs_to_many :users, join_table: :users_roles has_many :role_permissions - default_scope { includes(:role_permissions) } + default_scope { includes(:role_permissions).order(:priority) } scope :by_priority, -> { order(:priority) } scope :editable_roles, ->(provider) { where(provider: provider).where.not(name: %w[super_admin denied pending]) } @@ -42,8 +42,7 @@ class Role < ApplicationRecord Role.create(name: "super_admin", provider: provider, priority: -3, colour: "#cd201f") .update_all_role_permissions(can_create_rooms: true, send_promoted_email: true, send_demoted_email: true, can_edit_site_settings: true, - can_edit_roles: true, can_manage_users: true, can_manage_rooms_recordings: true, - can_appear_in_share_list: true) + can_edit_roles: true, can_manage_users: true, can_manage_rooms_recordings: true) end def self.create_new_role(role_name, provider) diff --git a/config/application.rb b/config/application.rb index 57d32123..7414d6c2 100644 --- a/config/application.rb +++ b/config/application.rb @@ -154,7 +154,7 @@ module Greenlight config.number_of_rooms_default = 15 # Allow users to share rooms by default - config.shared_access_default = (ENV["SHARED_ACCESS"] == "true").to_s + config.shared_access_default = "true" # Default admin password config.admin_password_default = ENV['ADMIN_PASSWORD'] || 'administrator'