forked from External/greenlight
GRN2-xx: Fixed issue with room settings not showing updated values (#727)
* Fixed issue with room settings not showing updated values * Updated rake task to take provider
This commit is contained in:
parent
7bafd41a56
commit
a5fd4a08b5
|
@ -56,6 +56,7 @@ $(document).on('turbolinks:load', function(){
|
|||
$("#room_mute_on_join").prop("checked", false)
|
||||
$("#room_require_moderator_approval").prop("checked", false)
|
||||
$("#room_anyone_can_start").prop("checked", false)
|
||||
$("#room_all_join_moderator").prop("checked", false)
|
||||
|
||||
//show all elements & their children with a create-only class
|
||||
$(".create-only").each(function() {
|
||||
|
@ -121,6 +122,12 @@ $(document).on('turbolinks:load', function(){
|
|||
} else { //default option
|
||||
$("#room_anyone_can_start").prop("checked", false)
|
||||
}
|
||||
|
||||
if(settings.joinModerator){
|
||||
$("#room_all_join_moderator").prop("checked", true)
|
||||
} else { //default option
|
||||
$("#room_all_join_moderator").prop("checked", false)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ $(document).on('turbolinks:load', function(){
|
|||
|
||||
// Add the role tag
|
||||
var tag_container = $("#role-tag-container");
|
||||
tag_container.append("<span id=\"user-role-tag_" + select_role_id + "\" style=\"background-color:" + selected_role.data("colour") + ";\" class=\"tag\">" +
|
||||
tag_container.append("<span id=\"user-role-tag_" + select_role_id + "\" style=\"background-color:" + selected_role.data("colour") + ";\" class=\"tag user-role-tag\">" +
|
||||
selected_role.text() + "<a data-role-id=\"" + select_role_id + "\" class=\"tag-addon clear-role\"><i data-role-id=\"" + select_role_id + "\" class=\"fas fa-times\"></i></a></span>");
|
||||
|
||||
// Update the role ids input that gets submited on user update
|
||||
|
|
|
@ -4,12 +4,13 @@ require 'bigbluebutton_api'
|
|||
|
||||
namespace :user do
|
||||
desc "Creates a user account"
|
||||
task :create, [:name, :email, :password, :role] => :environment do |_task, args|
|
||||
task :create, [:name, :email, :password, :role, :provider] => :environment do |_task, args|
|
||||
u = {
|
||||
name: args[:name],
|
||||
password: args[:password],
|
||||
email: args[:email],
|
||||
role: args[:role] || "user"
|
||||
role: args[:role] || "user",
|
||||
provider: args[:provider] || "greenlight"
|
||||
}
|
||||
|
||||
if u[:role] == "admin"
|
||||
|
@ -25,9 +26,9 @@ namespace :user do
|
|||
u[:email].prepend "superadmin-" if args[:role] == "super_admin"
|
||||
|
||||
# Create account if it doesn't exist
|
||||
if !User.exists?(email: u[:email])
|
||||
if !User.exists?(email: u[:email], provider: u[:provider])
|
||||
user = User.create(name: u[:name], email: u[:email], password: u[:password],
|
||||
provider: 'greenlight', email_verified: true)
|
||||
provider: u[:provider], email_verified: true)
|
||||
|
||||
unless user.valid?
|
||||
puts "Invalid Arguments"
|
||||
|
|
Loading…
Reference in New Issue