Small fixes to shared access (#966)

This commit is contained in:
Ahmad Farhat 2020-02-28 10:13:51 -05:00 committed by GitHub
parent 2c1472daff
commit 50f4d5e4f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View File

@ -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)

View File

@ -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'