Merge pull request #621 from bigbluebutton/v2.2-alpha
v2.2-alpha release
11
Gemfile
|
@ -26,7 +26,7 @@ gem 'coffee-rails', '~> 4.2'
|
|||
gem 'mini_racer', platforms: :ruby
|
||||
|
||||
# Use jquery as the JavaScript library
|
||||
gem 'jquery-rails'
|
||||
gem 'jquery-rails', '~> 4.3.3'
|
||||
|
||||
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
|
||||
gem 'turbolinks', '~> 5'
|
||||
|
@ -44,9 +44,10 @@ gem 'bcrypt', '~> 3.1.7'
|
|||
gem 'omniauth'
|
||||
gem 'omniauth-twitter'
|
||||
gem 'omniauth-google-oauth2'
|
||||
gem 'omniauth-microsoft-office365', '~> 0.0.7'
|
||||
gem 'omniauth-ldap'
|
||||
gem 'omniauth-bn-launcher', '~> 0.1.0'
|
||||
gem 'omniauth-bn-office365', git: 'https://github.com/blindsidenetworks/omniauth-bn-office365.git', tag: '0.1.0'
|
||||
gem 'omniauth-bn-launcher', git: 'https://github.com/blindsidenetworks/omniauth-bn-launcher.git', tag: '0.1.1'
|
||||
gem 'bn-ldap-authentication', git: 'https://github.com/blindsidenetworks/bn-ldap-authentication.git'
|
||||
gem 'net-ldap'
|
||||
|
||||
# BigBlueButton API wrapper.
|
||||
gem 'bigbluebutton-api-ruby'
|
||||
|
@ -121,3 +122,5 @@ gem 'random_password'
|
|||
|
||||
# Adds helpers for the Google reCAPTCHA API
|
||||
gem "recaptcha"
|
||||
|
||||
gem 'i18n-language-mapping', '~> 0.1.0'
|
||||
|
|
49
Gemfile.lock
|
@ -1,3 +1,28 @@
|
|||
GIT
|
||||
remote: https://github.com/blindsidenetworks/bn-ldap-authentication.git
|
||||
revision: 538132e0df70dbe470120f7bc7a93968c522031f
|
||||
specs:
|
||||
bn-ldap-authentication (1.0.0)
|
||||
net-ldap
|
||||
|
||||
GIT
|
||||
remote: https://github.com/blindsidenetworks/omniauth-bn-launcher.git
|
||||
revision: 025785046c3d532ed2252ef4762469c8d08d4839
|
||||
tag: 0.1.1
|
||||
specs:
|
||||
omniauth-bn-launcher (0.1.1)
|
||||
omniauth (~> 1.3, >= 1.3.2)
|
||||
omniauth-oauth2 (= 1.5.0)
|
||||
|
||||
GIT
|
||||
remote: https://github.com/blindsidenetworks/omniauth-bn-office365.git
|
||||
revision: d6640b37b5df50b5ed80e1271518bfb5dfb2a966
|
||||
tag: 0.1.0
|
||||
specs:
|
||||
omniauth-bn-office365 (1.0.0)
|
||||
omniauth (>= 1.3.2)
|
||||
omniauth-oauth2 (>= 1.5.0)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
@ -101,6 +126,7 @@ GEM
|
|||
http_accept_language (2.1.1)
|
||||
i18n (1.6.0)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n-language-mapping (0.1.0)
|
||||
jaro_winkler (1.5.2)
|
||||
jbuilder (2.9.1)
|
||||
activesupport (>= 4.2.0)
|
||||
|
@ -142,21 +168,10 @@ GEM
|
|||
omniauth (1.9.0)
|
||||
hashie (>= 3.4.6, < 3.7.0)
|
||||
rack (>= 1.6.2, < 3)
|
||||
omniauth-bn-launcher (0.1.0)
|
||||
omniauth (~> 1.3, >= 1.3.2)
|
||||
omniauth-oauth2 (= 1.5.0)
|
||||
omniauth-google-oauth2 (0.6.1)
|
||||
jwt (>= 2.0)
|
||||
omniauth (>= 1.1.1)
|
||||
omniauth-oauth2 (>= 1.5)
|
||||
omniauth-ldap (1.0.5)
|
||||
net-ldap (~> 0.12)
|
||||
omniauth (~> 1.0)
|
||||
pyu-ruby-sasl (~> 0.0.3.2)
|
||||
rubyntlm (~> 0.3.4)
|
||||
omniauth-microsoft-office365 (0.0.7)
|
||||
omniauth
|
||||
omniauth-oauth2
|
||||
omniauth-oauth (1.1.0)
|
||||
oauth
|
||||
omniauth (~> 1.0)
|
||||
|
@ -174,7 +189,6 @@ GEM
|
|||
popper_js (1.14.5)
|
||||
public_suffix (3.0.3)
|
||||
puma (3.12.1)
|
||||
pyu-ruby-sasl (0.0.3.3)
|
||||
rack (2.0.7)
|
||||
rack-test (0.6.3)
|
||||
rack (>= 1.0)
|
||||
|
@ -243,7 +257,6 @@ GEM
|
|||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 1.7)
|
||||
ruby-progressbar (1.10.0)
|
||||
rubyntlm (0.3.4)
|
||||
safe_yaml (1.0.5)
|
||||
sass (3.7.4)
|
||||
sass-listen (~> 4.0.0)
|
||||
|
@ -323,6 +336,7 @@ DEPENDENCIES
|
|||
action-cable-testing
|
||||
bcrypt (~> 3.1.7)
|
||||
bigbluebutton-api-ruby
|
||||
bn-ldap-authentication!
|
||||
bootstrap (~> 4.3.1)
|
||||
byebug
|
||||
cancancan (~> 2.0)
|
||||
|
@ -333,15 +347,16 @@ DEPENDENCIES
|
|||
faker
|
||||
health_check
|
||||
http_accept_language
|
||||
i18n-language-mapping (~> 0.1.0)
|
||||
jbuilder (~> 2.5)
|
||||
jquery-rails
|
||||
jquery-rails (~> 4.3.3)
|
||||
listen (~> 3.0.5)
|
||||
mini_racer
|
||||
net-ldap
|
||||
omniauth
|
||||
omniauth-bn-launcher (~> 0.1.0)
|
||||
omniauth-bn-launcher!
|
||||
omniauth-bn-office365!
|
||||
omniauth-google-oauth2
|
||||
omniauth-ldap
|
||||
omniauth-microsoft-office365 (~> 0.0.7)
|
||||
omniauth-twitter
|
||||
pagy
|
||||
pg (~> 0.18)
|
||||
|
|
|
@ -5,11 +5,9 @@
|
|||
!Status](https://coveralls.io/repos/github/bigbluebutton/greenlight/badge.svg?branch=master)
|
||||

|
||||
|
||||
> Greenlight is currently on version 2.0. If you are still running Greenlight 1.0 we suggest [upgrading to 2.0](http://docs.bigbluebutton.org/greenlight/gl-install.html#upgrading-from-greenlight-10).
|
||||
|
||||
Greenlight is a simple front-end interface for your BigBlueButton server. At it's heart, Greenlight provides a minimalistic web-based application that allows users to:
|
||||
|
||||
* Signup/Login with Twitter, Google, or through the application itself.
|
||||
* Signup/Login with Google, Office365, or through the application itself.
|
||||
* Manage your account settings and user preferences.
|
||||
* Create and manage your own personal rooms ([BigBlueButton](https://github.com/bigbluebutton/bigbluebutton) sessions).
|
||||
* Invite others to your room using a simple URL.
|
||||
|
|
After Width: | Height: | Size: 8.0 KiB |
|
@ -45,45 +45,8 @@ $(document).on('turbolinks:load', function(){
|
|||
})
|
||||
|
||||
/* COLOR SELECTORS */
|
||||
|
||||
$('#colorinput-regular').ColorPicker({
|
||||
onBeforeShow: function () {
|
||||
var colour = rgb2hex($("#colorinput-regular").css("background-color"))
|
||||
|
||||
$(this).ColorPickerSetColor(colour);
|
||||
},
|
||||
onSubmit: function(_hsb, hex) {
|
||||
$.post($("#coloring-path-regular").val(), {color: '#' + hex}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
$('#colorinput-lighten').ColorPicker({
|
||||
onBeforeShow: function () {
|
||||
var colour = rgb2hex($("#colorinput-lighten").css("background-color"))
|
||||
|
||||
$(this).ColorPickerSetColor(colour);
|
||||
},
|
||||
onSubmit: function(_hsb, hex) {
|
||||
$.post($("#coloring-path-lighten").val(), {color: '#' + hex}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
$('#colorinput-darken').ColorPicker({
|
||||
onBeforeShow: function () {
|
||||
var colour = rgb2hex($("#colorinput-darken").css("background-color"))
|
||||
|
||||
$(this).ColorPickerSetColor(colour);
|
||||
},
|
||||
onSubmit: function(_hsb, hex) {
|
||||
$.post($("#coloring-path-darken").val(), {color: '#' + hex}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
},
|
||||
});
|
||||
loadColourSelectors()
|
||||
}
|
||||
|
||||
// Only run on the admins edit user page.
|
||||
|
@ -119,11 +82,82 @@ function filterRole(role) {
|
|||
window.location.replace(url);
|
||||
}
|
||||
|
||||
function rgb2hex(rgb) {
|
||||
rgb = rgb.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/);
|
||||
function hex(x) {
|
||||
return ("0" + parseInt(x).toString(16)).slice(-2);
|
||||
}
|
||||
return "#" + hex(rgb[1]) + hex(rgb[2]) + hex(rgb[3]);
|
||||
}
|
||||
function loadColourSelectors() {
|
||||
const pickrRegular = new Pickr({
|
||||
el: '#colorinput-regular',
|
||||
theme: 'monolith',
|
||||
useAsButton: true,
|
||||
lockOpacity: true,
|
||||
defaultRepresentation: 'HEX',
|
||||
closeWithKey: 'Enter',
|
||||
default: $("#colorinput-regular").css("background-color"),
|
||||
|
||||
components: {
|
||||
palette: true,
|
||||
preview: true,
|
||||
hue: true,
|
||||
interaction: {
|
||||
input: true,
|
||||
save: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const pickrLighten = new Pickr({
|
||||
el: '#colorinput-lighten',
|
||||
theme: 'monolith',
|
||||
useAsButton: true,
|
||||
lockOpacity: true,
|
||||
defaultRepresentation: 'HEX',
|
||||
closeWithKey: 'Enter',
|
||||
default: $("#colorinput-lighten").css("background-color"),
|
||||
|
||||
components: {
|
||||
palette: true,
|
||||
preview: true,
|
||||
hue: true,
|
||||
interaction: {
|
||||
input: true,
|
||||
save: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const pickrDarken = new Pickr({
|
||||
el: '#colorinput-darken',
|
||||
theme: 'monolith',
|
||||
useAsButton: true,
|
||||
lockOpacity: true,
|
||||
defaultRepresentation: 'HEX',
|
||||
closeWithKey: 'Enter',
|
||||
default: $("#colorinput-darken").css("background-color"),
|
||||
|
||||
components: {
|
||||
palette: true,
|
||||
preview: true,
|
||||
hue: true,
|
||||
interaction: {
|
||||
input: true,
|
||||
save: true,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
pickrRegular.on("save", (color, instance) => {
|
||||
$.post($("#coloring-path-regular").val(), {color: color.toHEXA().toString()}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
})
|
||||
|
||||
pickrLighten.on("save", (color, instance) => {
|
||||
$.post($("#coloring-path-lighten").val(), {color: color.toHEXA().toString()}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
})
|
||||
|
||||
pickrDarken.on("save", (color, instance) => {
|
||||
$.post($("#coloring-path-darken").val(), {color: color.toHEXA().toString()}).done(function() {
|
||||
location.reload()
|
||||
});
|
||||
})
|
||||
}
|
|
@ -31,5 +31,4 @@
|
|||
//= require tabler
|
||||
//= require tabler.plugins
|
||||
//= require jquery_ujs
|
||||
//= require colorpicker
|
||||
//= require_tree .
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
.user-role {
|
||||
color: white !important;
|
||||
}
|
||||
|
||||
.user-email {
|
||||
max-width: 250px;
|
||||
}
|
||||
}
|
||||
|
||||
#clear-search {
|
||||
|
@ -41,4 +45,13 @@
|
|||
|
||||
.authentication-required{
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
#site_settings {
|
||||
.colorinput-color {
|
||||
text-align: center;
|
||||
padding-top: 4px;
|
||||
height: 2rem;
|
||||
width: 2rem;
|
||||
}
|
||||
}
|
|
@ -33,7 +33,6 @@
|
|||
@import "tabler/variables";
|
||||
@import "bootstrap";
|
||||
@import "tabler-custom";
|
||||
@import "colorpicker";
|
||||
|
||||
@import "utilities/variables";
|
||||
@import "admins";
|
||||
|
|
|
@ -123,7 +123,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
.customBtn-microsoft_office365 {
|
||||
.customBtn-office365 {
|
||||
@extend .customBtn;
|
||||
background: #f65314;
|
||||
|
||||
|
@ -145,6 +145,17 @@
|
|||
}
|
||||
}
|
||||
|
||||
.customBtn-ldap {
|
||||
@extend .customBtn;
|
||||
background: #d61515;
|
||||
|
||||
.customBtn-image {
|
||||
background: #ffffff image-url("ldap-logo.png") no-repeat left top;
|
||||
background-size: 18px 18px;
|
||||
padding:10px 10px 10px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.signin-button {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ class AdminsController < ApplicationController
|
|||
|
||||
manage_users = [:edit_user, :promote, :demote, :ban_user, :unban_user, :approve]
|
||||
site_settings = [:branding, :coloring, :coloring_lighten, :coloring_darken,
|
||||
:registration_method, :room_authentication]
|
||||
:registration_method, :room_authentication, :room_limit]
|
||||
|
||||
authorize_resource class: false
|
||||
before_action :find_user, only: manage_users
|
||||
|
@ -153,6 +153,12 @@ class AdminsController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
# POST /admins/room_limit
|
||||
def room_limit
|
||||
@settings.update_value("Room Limit", params[:limit])
|
||||
redirect_to admins_path, flash: { success: I18n.t("administrator.flash.settings") }
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_user
|
||||
|
|
|
@ -131,10 +131,25 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def set_user_domain
|
||||
@user_domain = if Rails.env.test? || !Rails.configuration.loadbalanced_configuration
|
||||
"greenlight"
|
||||
if Rails.env.test? || !Rails.configuration.loadbalanced_configuration
|
||||
@user_domain = "greenlight"
|
||||
else
|
||||
parse_user_domain(request.host)
|
||||
@user_domain = parse_user_domain(request.host)
|
||||
|
||||
# Checks to see if the user exists
|
||||
begin
|
||||
retrieve_provider_info(@user_domain, 'api2', 'getUserGreenlightCredentials')
|
||||
rescue => e
|
||||
if e.message.eql? "No user with that id exists"
|
||||
render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_not_found.message"),
|
||||
help: I18n.t("errors.not_found.user_not_found.help") }
|
||||
elsif e.message.eql? "Provider not included."
|
||||
render "errors/not_found", locals: { message: I18n.t("errors.not_found.user_missing.message"),
|
||||
help: I18n.t("errors.not_found.user_missing.help") }
|
||||
else
|
||||
render "errors/internal_error"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
helper_method :set_user_domain
|
||||
|
|
|
@ -21,10 +21,6 @@ class ErrorsController < ApplicationController
|
|||
render status: 404, formats: :html
|
||||
end
|
||||
|
||||
def unprocessable
|
||||
render status: 422, formats: :html
|
||||
end
|
||||
|
||||
def internal_error
|
||||
render status: 500, formats: :html
|
||||
end
|
||||
|
|
|
@ -33,6 +33,8 @@ class RoomsController < ApplicationController
|
|||
def create
|
||||
redirect_to(root_path) && return unless current_user
|
||||
|
||||
return redirect_to current_user.main_room, flash: { alert: I18n.t("room.room_limit") } if room_limit_exceeded
|
||||
|
||||
@room = Room.new(name: room_params[:name])
|
||||
@room.owner = current_user
|
||||
@room.room_settings = create_room_settings_string(room_params[:mute_on_join], room_params[:client])
|
||||
|
@ -279,4 +281,14 @@ class RoomsController < ApplicationController
|
|||
Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
|
||||
current_user.nil?
|
||||
end
|
||||
|
||||
def room_limit_exceeded
|
||||
limit = Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i
|
||||
|
||||
# Does not apply to admin
|
||||
# 15+ option is used as unlimited
|
||||
return false if current_user&.has_role?(:admin) || limit == 15
|
||||
|
||||
current_user.rooms.count >= limit
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
class SessionsController < ApplicationController
|
||||
include Registrar
|
||||
include Emailer
|
||||
include LdapAuthenticator
|
||||
|
||||
skip_before_action :verify_authenticity_token, only: [:omniauth, :fail]
|
||||
|
||||
|
@ -47,33 +48,9 @@ class SessionsController < ApplicationController
|
|||
|
||||
# GET/POST /auth/:provider/callback
|
||||
def omniauth
|
||||
begin
|
||||
@auth = request.env['omniauth.auth']
|
||||
@user_exists = check_user_exists
|
||||
@auth = request.env['omniauth.auth']
|
||||
|
||||
# If using invitation registration method, make sure user is invited
|
||||
return redirect_to root_path, flash: { alert: I18n.t("registration.invite.no_invite") } unless passes_invite_reqs
|
||||
|
||||
user = User.from_omniauth(@auth)
|
||||
|
||||
# Add pending role if approval method and is a new user
|
||||
if approval_registration && !@user_exists
|
||||
user.add_role :pending
|
||||
|
||||
# Inform admins that a user signed up if emails are turned on
|
||||
send_approval_user_signup_email(user) if Rails.configuration.enable_email_verification
|
||||
|
||||
return redirect_to root_path, flash: { success: I18n.t("registration.approval.signup") }
|
||||
end
|
||||
|
||||
send_invite_user_signup_email(user) if Rails.configuration.enable_email_verification &&
|
||||
invite_registration && !@user_exists
|
||||
|
||||
login(user)
|
||||
rescue => e
|
||||
logger.error "Error authenticating via omniauth: #{e}"
|
||||
omniauth_fail
|
||||
end
|
||||
process_signin
|
||||
end
|
||||
|
||||
# POST /auth/failure
|
||||
|
@ -81,6 +58,34 @@ class SessionsController < ApplicationController
|
|||
redirect_to root_path, alert: I18n.t(params[:message], default: I18n.t("omniauth_error"))
|
||||
end
|
||||
|
||||
# GET /auth/ldap
|
||||
def ldap
|
||||
ldap_config = {}
|
||||
ldap_config[:host] = ENV['LDAP_SERVER']
|
||||
ldap_config[:port] = ENV['LDAP_PORT'].to_i != 0 ? ENV['LDAP_PORT'].to_i : 389
|
||||
ldap_config[:bind_dn] = ENV['LDAP_BIND_DN']
|
||||
ldap_config[:password] = ENV['LDAP_PASSWORD']
|
||||
ldap_config[:encryption] = if ENV['LDAP_METHOD'] == 'ssl'
|
||||
'simple_tls'
|
||||
elsif ENV['LDAP_METHOD'] == 'tls'
|
||||
'start_tls'
|
||||
end
|
||||
ldap_config[:base] = ENV['LDAP_BASE']
|
||||
ldap_config[:uid] = ENV['LDAP_UID']
|
||||
|
||||
result = send_ldap_request(params[:session], ldap_config)
|
||||
|
||||
if result
|
||||
result = result.first
|
||||
else
|
||||
return redirect_to(ldap_signin_path, alert: I18n.t("invalid_credentials"))
|
||||
end
|
||||
|
||||
@auth = parse_auth(result)
|
||||
|
||||
process_signin
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def session_params
|
||||
|
@ -99,4 +104,47 @@ class SessionsController < ApplicationController
|
|||
invitation = check_user_invited("", session[:invite_token], @user_domain)
|
||||
invitation[:present]
|
||||
end
|
||||
|
||||
def process_signin
|
||||
begin
|
||||
@user_exists = check_user_exists
|
||||
|
||||
if !@user_exists && @auth['provider'] == "twitter"
|
||||
return redirect_to root_path, flash: { alert: I18n.t("registration.deprecated.twitter_signup") }
|
||||
end
|
||||
|
||||
# If using invitation registration method, make sure user is invited
|
||||
return redirect_to root_path, flash: { alert: I18n.t("registration.invite.no_invite") } unless passes_invite_reqs
|
||||
|
||||
user = User.from_omniauth(@auth)
|
||||
|
||||
# Add pending role if approval method and is a new user
|
||||
if approval_registration && !@user_exists
|
||||
user.add_role :pending
|
||||
|
||||
# Inform admins that a user signed up if emails are turned on
|
||||
send_approval_user_signup_email(user) if Rails.configuration.enable_email_verification
|
||||
|
||||
return redirect_to root_path, flash: { success: I18n.t("registration.approval.signup") }
|
||||
end
|
||||
|
||||
send_invite_user_signup_email(user) if Rails.configuration.enable_email_verification &&
|
||||
invite_registration && !@user_exists
|
||||
|
||||
login(user)
|
||||
|
||||
if @auth['provider'] == "twitter"
|
||||
flash[:alert] = if allow_user_signup? && allow_greenlight_accounts?
|
||||
I18n.t("registration.deprecated.twitter_signin",
|
||||
link: signup_path(old_twitter_user_id: user.id))
|
||||
else
|
||||
I18n.t("registration.deprecated.twitter_signin",
|
||||
link: signin_path(old_twitter_user_id: user.id))
|
||||
end
|
||||
end
|
||||
rescue => e
|
||||
logger.error "Error authenticating via omniauth: #{e}"
|
||||
omniauth_fail
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -62,6 +62,14 @@ class UsersController < ApplicationController
|
|||
|
||||
# GET /signin
|
||||
def signin
|
||||
unless params[:old_twitter_user_id].nil? && session[:old_twitter_user_id].nil?
|
||||
flash[:alert] = I18n.t("registration.deprecated.new_signin")
|
||||
session[:old_twitter_user_id] = params[:old_twitter_user_id] unless params[:old_twitter_user_id].nil?
|
||||
end
|
||||
end
|
||||
|
||||
# GET /ldap_signin
|
||||
def ldap_signin
|
||||
end
|
||||
|
||||
# GET /signup
|
||||
|
@ -75,6 +83,12 @@ class UsersController < ApplicationController
|
|||
session[:invite_token] = params[:invite_token]
|
||||
end
|
||||
|
||||
unless params[:old_twitter_user_id].nil? && session[:old_twitter_user_id].nil?
|
||||
logout
|
||||
flash.now[:alert] = I18n.t("registration.deprecated.new_signin")
|
||||
session[:old_twitter_user_id] = params[:old_twitter_user_id] unless params[:old_twitter_user_id].nil?
|
||||
end
|
||||
|
||||
@user = User.new
|
||||
end
|
||||
|
||||
|
@ -175,7 +189,7 @@ class UsersController < ApplicationController
|
|||
end
|
||||
|
||||
def ensure_unauthenticated
|
||||
redirect_to current_user.main_room if current_user
|
||||
redirect_to current_user.main_room if current_user && params[:old_twitter_user_id].nil?
|
||||
end
|
||||
|
||||
def user_params
|
||||
|
|
|
@ -53,4 +53,8 @@ module AdminsHelper
|
|||
I18n.t("administrator.site_settings.registration.methods.approval")
|
||||
end
|
||||
end
|
||||
|
||||
def room_limit_number
|
||||
Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i
|
||||
end
|
||||
end
|
||||
|
|
|
@ -17,10 +17,12 @@
|
|||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
require 'bbb_api'
|
||||
require 'i18n/language/mapping'
|
||||
|
||||
module ApplicationHelper
|
||||
include MeetingsHelper
|
||||
include BbbApi
|
||||
include I18n::Language::Mapping
|
||||
|
||||
# Gets all configured omniauth providers.
|
||||
def configured_providers
|
||||
|
@ -31,12 +33,20 @@ module ApplicationHelper
|
|||
|
||||
# Determines which providers can show a login button in the login modal.
|
||||
def iconset_providers
|
||||
configured_providers & [:google, :twitter, :microsoft_office365]
|
||||
providers = configured_providers & [:google, :twitter, :microsoft_office365, :ldap]
|
||||
|
||||
providers.delete(:twitter) if session[:old_twitter_user_id]
|
||||
|
||||
providers
|
||||
end
|
||||
|
||||
# Generates the login URL for a specific provider.
|
||||
def omniauth_login_url(provider)
|
||||
"#{Rails.configuration.relative_url_root}/auth/#{provider}"
|
||||
if provider == :ldap
|
||||
ldap_signin_path
|
||||
else
|
||||
"#{Rails.configuration.relative_url_root}/auth/#{provider}"
|
||||
end
|
||||
end
|
||||
|
||||
# Determine if Greenlight is configured to allow user signups.
|
||||
|
@ -54,9 +64,8 @@ module ApplicationHelper
|
|||
locales = I18n.available_locales
|
||||
language_opts = [['<<<< ' + t("language_default") + ' >>>>', "default"]]
|
||||
locales.each do |locale|
|
||||
language_name = t("language_name", locale: locale)
|
||||
language_name = locale.to_s if locale != :en && language_name == 'English'
|
||||
language_opts.push([language_name, locale.to_s])
|
||||
language_mapping = I18n::Language::Mapping.language_mapping_list[locale.to_s.gsub("_", "-")]
|
||||
language_opts.push([language_mapping["nativeName"], locale.to_s])
|
||||
end
|
||||
language_opts.sort
|
||||
end
|
||||
|
|
|
@ -27,4 +27,28 @@ module RoomsHelper
|
|||
Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Authentication") == "true" &&
|
||||
current_user.nil?
|
||||
end
|
||||
|
||||
def number_of_rooms_allowed
|
||||
Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i
|
||||
end
|
||||
|
||||
def room_limit_exceeded
|
||||
limit = Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i
|
||||
|
||||
# Does not apply to admin or users that aren't signed in
|
||||
# 15+ option is used as unlimited
|
||||
return false if current_user&.has_role?(:admin) || limit == 15
|
||||
|
||||
current_user.rooms.length >= limit
|
||||
end
|
||||
|
||||
def current_room_exceeds_limit(room)
|
||||
# Get how many rooms need to be deleted to reach allowed room number
|
||||
limit = Setting.find_or_create_by!(provider: user_settings_provider).get_value("Room Limit").to_i
|
||||
|
||||
return false if current_user&.has_role?(:admin) || limit == 15
|
||||
|
||||
@diff = current_user.rooms.count - limit
|
||||
@diff.positive? && current_user.rooms.pluck(:id).index(room.id) + 1 > limit
|
||||
end
|
||||
end
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
module SessionsHelper
|
||||
# Logs a user into GreenLight.
|
||||
def login(user)
|
||||
migrate_twitter_user(user)
|
||||
|
||||
session[:user_id] = user.id
|
||||
|
||||
# If there are not terms, or the user has accepted them, check for email verification
|
||||
|
@ -76,17 +78,27 @@ module SessionsHelper
|
|||
end
|
||||
|
||||
def omniauth_options(env)
|
||||
gl_redirect_url = (Rails.env.production? ? "https" : env["rack.url_scheme"]) + "://" + env["SERVER_NAME"] + ":" +
|
||||
env["SERVER_PORT"]
|
||||
user_domain = parse_user_domain(env["SERVER_NAME"])
|
||||
env['omniauth.strategy'].options[:customer] = user_domain
|
||||
env['omniauth.strategy'].options[:gl_redirect_url] = gl_redirect_url
|
||||
env['omniauth.strategy'].options[:default_callback_url] = Rails.configuration.gl_callback_url
|
||||
env['omniauth.strategy'].options[:checksum] = generate_checksum(user_domain, gl_redirect_url,
|
||||
Rails.configuration.launcher_secret)
|
||||
if env['omniauth.strategy'].options[:name] == "bn-launcher"
|
||||
protocol = Rails.env.production? ? "https" : env["rack.url_scheme"]
|
||||
|
||||
customer_redirect_url = protocol + "://" + env["SERVER_NAME"] + ":" +
|
||||
env["SERVER_PORT"]
|
||||
user_domain = parse_user_domain(env["SERVER_NAME"])
|
||||
env['omniauth.strategy'].options[:customer] = user_domain
|
||||
env['omniauth.strategy'].options[:customer_redirect_url] = customer_redirect_url
|
||||
env['omniauth.strategy'].options[:default_callback_url] = Rails.configuration.gl_callback_url
|
||||
|
||||
# This is only used in the old launcher and should eventually be removed
|
||||
env['omniauth.strategy'].options[:checksum] = generate_checksum(user_domain, customer_redirect_url,
|
||||
Rails.configuration.launcher_secret)
|
||||
elsif env['omniauth.strategy'].options[:name] == "google"
|
||||
set_hd(env, ENV['GOOGLE_OAUTH2_HD'])
|
||||
elsif env['omniauth.strategy'].options[:name] == "office365"
|
||||
set_hd(env, ENV['OFFICE365_HD'])
|
||||
end
|
||||
end
|
||||
|
||||
def google_omniauth_hd(env, hd)
|
||||
def set_hd(env, hd)
|
||||
hd_opts = hd.split(',')
|
||||
env['omniauth.strategy'].options[:hd] =
|
||||
if hd_opts.empty?
|
||||
|
@ -97,4 +109,24 @@ module SessionsHelper
|
|||
hd_opts
|
||||
end
|
||||
end
|
||||
|
||||
def migrate_twitter_user(user)
|
||||
if !session["old_twitter_user_id"].nil? && user.provider != "twitter"
|
||||
old_user = User.find(session["old_twitter_user_id"])
|
||||
|
||||
old_user.rooms.each do |room|
|
||||
room.owner = user
|
||||
|
||||
room.name = "Old " + room.name if room.id == old_user.main_room.id
|
||||
|
||||
room.save!
|
||||
end
|
||||
|
||||
# Query for the old user again so the migrated rooms don't get deleted
|
||||
old_user.reload
|
||||
old_user.destroy!
|
||||
|
||||
session["old_twitter_user_id"] = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -41,6 +41,8 @@ class Setting < ApplicationRecord
|
|||
Rails.configuration.registration_method_default
|
||||
when "Room Authentication"
|
||||
false
|
||||
when "Room Limit"
|
||||
Rails.configuration.number_of_rooms_default
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -70,7 +70,7 @@ class User < ApplicationRecord
|
|||
# Provider attributes.
|
||||
def auth_name(auth)
|
||||
case auth['provider']
|
||||
when :microsoft_office365
|
||||
when :office365
|
||||
auth['info']['display_name']
|
||||
else
|
||||
auth['info']['name']
|
||||
|
@ -97,7 +97,7 @@ class User < ApplicationRecord
|
|||
when :twitter
|
||||
auth['info']['image'].gsub("http", "https").gsub("_normal", "")
|
||||
else
|
||||
auth['info']['image'] unless auth['provider'] == :microsoft_office365
|
||||
auth['info']['image']
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -12,6 +12,11 @@
|
|||
# You should have received a copy of the GNU Lesser General Public License along
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<% # Only load the color picker on the Admins page %>
|
||||
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css" %>
|
||||
<%= javascript_include_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js" %>
|
||||
|
||||
<div class="container pt-6">
|
||||
<%= render "shared/components/subtitle", subtitle: t("administrator.title"), search: false %>
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%>
|
||||
|
||||
<div class="container text-center pt-9">
|
||||
<div class="display-1 text-muted mb-5"><%= I18n.t("errors.bigbluebutton.title") %></div>
|
||||
<h1 class="h2 mb-3"><%= I18n.t("errors.bigbluebutton.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= I18n.t("errors.bigbluebutton.help", doc_link: "http://docs.bigbluebutton.org/greenlight/gl-install.html#setting-bigbluebutton-credentials").html_safe %></p>
|
||||
<div class="display-1 text-muted mb-5"><%= t("errors.bigbluebutton.title") %></div>
|
||||
<h1 class="h2 mb-3"><%= t("errors.bigbluebutton.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.bigbluebutton.help", doc_link: "http://docs.bigbluebutton.org/greenlight/gl-install.html#setting-bigbluebutton-credentials").html_safe %></p>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%>
|
||||
|
||||
<div class="container text-center pt-9">
|
||||
<div class="display-1 text-muted mb-5">500</div>
|
||||
<div class="display-1 text-primary mb-5">500</div>
|
||||
<h1 class="h2 mb-3"><%= t("errors.internal.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.internal.help") %></p>
|
||||
<a class="btn btn-primary" href="javascript:history.back()">
|
||||
|
|
|
@ -14,10 +14,15 @@
|
|||
%>
|
||||
|
||||
<div class="container text-center pt-9">
|
||||
<div class="display-1 text-muted mb-5">404</div>
|
||||
<h1 class="h2 mb-3"><%= t("errors.not_found.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.not_found.help") %></p>
|
||||
<a class="btn btn-primary" href="javascript:history.back()">
|
||||
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
|
||||
</a>
|
||||
<div class="display-1 mb-5 text-primary">404</div>
|
||||
<% if defined?(message) && defined?(help) %>
|
||||
<h1 class="h2 mb-3"><%= message %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= help %></p>
|
||||
<% else %>
|
||||
<h1 class="h2 mb-3"><%= t("errors.not_found.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.not_found.help") %></p>
|
||||
<a class="btn btn-primary" href="javascript:history.back()">
|
||||
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%>
|
||||
|
||||
<div class="container text-center pt-9">
|
||||
<div class="display-1 text-muted mb-5">401</div>
|
||||
<h1 class="h2 mb-3"><%= I18n.t("errors.unauthorized.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= I18n.t("errors.unauthorized.help") %></p>
|
||||
<div class="display-1 text-primary mb-5">401</div>
|
||||
<h1 class="h2 mb-3"><%= t("errors.unauthorized.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.unauthorized.help") %></p>
|
||||
</div>
|
||||
|
|
|
@ -1,23 +0,0 @@
|
|||
<%
|
||||
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||
# This program is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
# You should have received a copy of the GNU Lesser General Public License along
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<div class="container text-center pt-9">
|
||||
<div class="display-1 text-muted mb-5">422</div>
|
||||
<h1 class="h2 mb-3"><%= t("errors.unprocessable.message") %></h1>
|
||||
<p class="h4 text-muted font-weight-normal mb-7"><%= t("errors.unprocessable.help") %></p>
|
||||
<a class="btn btn-primary" href="javascript:history.back()">
|
||||
<i class="fas fa-arrow-left mr-2"></i><%= t("go_back") %>
|
||||
</a>
|
||||
</div>
|
|
@ -13,54 +13,65 @@
|
|||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
%>
|
||||
|
||||
<% exceeds_limit = current_room_exceeds_limit(@room)%>
|
||||
<% if exceeds_limit%>
|
||||
<div class="alert alert-danger alert-dismissible text-center mb-0">
|
||||
<%= t("room.room_limit_exceeded", difference: @diff) %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div class="background pb-1">
|
||||
<div class="container">
|
||||
<div class="row pt-9">
|
||||
<div class="col-lg-8 col-sm-12">
|
||||
<div id="room-title" class="display-3 form-inline <%= 'edit_hover_class' if current_user.main_room != @room %>">
|
||||
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= @room.name %></h1>
|
||||
<% if current_user.main_room == @room %>
|
||||
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= t("home_room") %></h1>
|
||||
<a class="disable-click"><i class="fas fa-home align-top home-indicator ml-2"></i></a>
|
||||
<% else %>
|
||||
<h1 contenteditable=false id="user-text" class="display-3 text-left mb-3 font-weight-400"><%= @room.name %></h1>
|
||||
<a><i id="edit-room" class="fa fa-edit align-top home-indicator ml-2" data-edit-room="<%= @room.uid %>"></i></a>
|
||||
<% end %>
|
||||
</div>
|
||||
<h4 class="text-left mb-6"><%= @room.sessions %> <%= t("room.sessions") %> | <%= @recordings.length %> <%= t("room.recordings") %></h4>
|
||||
<label class="form-label"><%= t("room.invite_participants") %></label>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-12 mt-2 pr-0">
|
||||
<div class="input-icon invite-link-input">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-link"></i>
|
||||
</span>
|
||||
<input id="invite-url" type="text" class="form-control w-100" value="<%= request.base_url + @room.invite_path %>" readonly="">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-7 col-md-12 pr-0">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="#" id="copy" class="btn btn-primary btn-block mt-2">
|
||||
<i class="fas fa-copy"></i>
|
||||
<%= t("copy") %>
|
||||
</a>
|
||||
<% unless exceeds_limit %>
|
||||
<label class="form-label"><%= t("room.invite_participants") %></label>
|
||||
<div class="row">
|
||||
<div class="col-lg-5 col-md-12 mt-2 pr-0">
|
||||
<div class="input-icon invite-link-input">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-link"></i>
|
||||
</span>
|
||||
<input id="invite-url" type="text" class="form-control w-100" value="<%= request.base_url + @room.invite_path %>" readonly="">
|
||||
</div>
|
||||
<div class="col-sm-6 pl-0">
|
||||
<% if Rails.configuration.enable_google_calendar_button %>
|
||||
<a href="<%= google_calendar_path %>" target="__blank" id="schedule" class="btn btn-primary btn-block mt-2">
|
||||
<i class="fas fa-calendar-plus"></i>
|
||||
<%= t("add_to_google_calendar") %>
|
||||
</div>
|
||||
<div class="col-lg-7 col-md-12 pr-0">
|
||||
<div class="row">
|
||||
<div class="col-sm-6">
|
||||
<a href="#" id="copy" class="btn btn-primary btn-block mt-2">
|
||||
<i class="fas fa-copy"></i>
|
||||
<%= t("copy") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="col-sm-6 pl-0">
|
||||
<% if Rails.configuration.enable_google_calendar_button %>
|
||||
<a href="<%= google_calendar_path %>" target="__blank" id="schedule" class="btn btn-primary btn-block mt-2">
|
||||
<i class="fas fa-calendar-plus"></i>
|
||||
<%= t("add_to_google_calendar") %>
|
||||
</a>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<div class="offset-lg-1 col-lg-3 col-sm-12 force-bottom mt-5 pr-0">
|
||||
<% if @is_running %>
|
||||
<%= button_to t("room.join"), room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
|
||||
<% else %>
|
||||
<%= button_to t("room.start"), start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
|
||||
<% unless exceeds_limit %>
|
||||
<%= button_to t("room.start"), start_room_path(@room), class: "btn btn-primary btn-block px-7 start-button float-right" %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -81,7 +92,9 @@
|
|||
<%= render "shared/modals/delete_room_modal", room: room %>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<%= render "shared/components/create_room_block"%>
|
||||
<% unless room_limit_exceeded %>
|
||||
<%= render "shared/components/create_room_block"%>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,17 +17,17 @@
|
|||
<% if key.eql? "success" %>
|
||||
<div class="alert alert-success alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
<%= value.html_safe %>
|
||||
</div>
|
||||
<% elsif key.eql? "alert" %>
|
||||
<div class="alert alert-danger alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
<%= value.html_safe %>
|
||||
</div>
|
||||
<% elsif key.eql? "info" %>
|
||||
<div class="alert alert-info alert-dismissible text-center mb-0">
|
||||
<button type="button" class="close" data-dismiss="alert">×</button>
|
||||
<%= value %>
|
||||
<%= value.html_safe %>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
%>
|
||||
|
||||
<footer class="footer pt-3">
|
||||
<p class="text-center mb-1"><%= t("footer.powered_by", href: link_to(t("greenlight"), "https://bigbluebutton.org/2018/07/09/greenlight-2-0/", target: "_blank")).html_safe %> v <%= Greenlight::Application::VERSION %></p>
|
||||
<p class="text-center mb-1"><%= t("footer.powered_by", href: link_to(t("greenlight"), "https://bigbluebutton.org/2018/07/09/greenlight-2-0/", target: "_blank")).html_safe %> <%= Greenlight::Application::VERSION %></p>
|
||||
</footer>
|
||||
|
||||
<%= render "shared/components/cookie_warning" %>
|
||||
|
|
|
@ -72,9 +72,7 @@
|
|||
</div>
|
||||
<% else %>
|
||||
<% allow_greenlight_accounts = allow_greenlight_accounts? %>
|
||||
<% if Rails.configuration.omniauth_ldap %>
|
||||
<%= link_to t("login"), omniauth_login_url(:ldap), :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% elsif allow_greenlight_accounts %>
|
||||
<% if allow_greenlight_accounts %>
|
||||
<%= link_to t("login"), signin_path, :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
<% elsif Rails.configuration.loadbalanced_configuration %>
|
||||
<%= link_to t("login"), omniauth_login_url(:bn_launcher), :class => "btn btn-outline-primary mx-2 sign-in-button" %>
|
||||
|
|
|
@ -78,7 +78,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="mb-6 row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.authentication.title") %></label>
|
||||
|
@ -99,4 +99,38 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="form-group">
|
||||
<label class="form-label"><%= t("administrator.site_settings.rooms.title") %></label>
|
||||
<label class="form-label text-muted"><%= t("administrator.site_settings.rooms.info") %></label>
|
||||
<div class="row gutters-xs">
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 1), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 1 ? "btn-primary" : "btn-outline-primary" %>">1</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 5), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 5 ? "btn-primary" : "btn-outline-primary" %>">5</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 10), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 10 ? "btn-primary" : "btn-outline-primary" %>">10</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<label class="colorinput">
|
||||
<%= button_to admin_room_limit_path(limit: 15), class: "colorinput-input" do %><% end %>
|
||||
<span class="colorinput-color <%= room_limit_number == 15 ? "btn-primary" : "btn-outline-primary" %>">15+</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover table-outline table-vcenter text-nowrap card-table">
|
||||
<table class="table table-hover table-outline table-vcenter card-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-header="name" data-order="<%= @order_column == "name" ? @order_direction : "none" %>">
|
||||
|
@ -69,7 +69,7 @@
|
|||
<div><%= user.name %></div>
|
||||
<div class="small text-muted"><%= [t("administrator.users.table.created"), ": ", user.created_at].join %></div>
|
||||
</td>
|
||||
<td><%= user.email && user.email != "" ? user.email : user.username%></td>
|
||||
<td class="user-email"><%= user.email && user.email != "" ? user.email : user.username%></td>
|
||||
<td><%= user.provider %></td>
|
||||
<td class="text-center">
|
||||
<% roles = user.roles().pluck(:name) %>
|
||||
|
|
|
@ -28,7 +28,11 @@
|
|||
</td>
|
||||
<td>
|
||||
<div id="room-name">
|
||||
<h4 contenteditable="false" class="m-0 force-text-normal" ><%= room.name %></h4>
|
||||
<% if room == current_user.main_room %>
|
||||
<h4 contenteditable="false" class="m-0 force-text-normal" ><%= t("home_room") %></h4>
|
||||
<% else %>
|
||||
<h4 contenteditable="false" class="m-0 force-text-normal" ><%= room.name %></h4>
|
||||
<% end %>
|
||||
</div>
|
||||
<div id="room-name-editable" style="display: none">
|
||||
<input id="room-name-editable-input" class="form-control input-sm w-100 h-4" value="<%= room.name %>">
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</p>
|
||||
|
||||
<p style="margin-bottom:35px;">
|
||||
<%= t('mailer.user.invite.signup') %>
|
||||
<%= t('mailer.user.invite.signup_info') %>
|
||||
</p>
|
||||
|
||||
<a style="background: <%= @color %>;color: #ffffff; padding: 10px 15px; box-shadow: 0 2px 4px 0 rgba(0,0,0,.25);border: 1px solid transparent;text-decoration:none;" href="<%= @url %>">
|
||||
|
|
|
@ -22,6 +22,6 @@
|
|||
|
||||
<%= t('mailer.user.invite.username', email: @email) %>
|
||||
|
||||
<%= t('mailer.user.invite.signup') %>
|
||||
<%= t('mailer.user.invite.signup_info') %>
|
||||
|
||||
<%= @url %>
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<div class="container">
|
||||
<div class="row pt-7">
|
||||
<div class="col col-lg-6 offset-lg-3">
|
||||
<div class="card">
|
||||
<div class="card-header background">
|
||||
<h4 class="mt-2"><%= t("login_title") %></h4>
|
||||
</div>
|
||||
<div class="card-body background">
|
||||
<%= form_for(:session, url: ldap_callback_path) do |f| %>
|
||||
<div class="form-group">
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-user"></i>
|
||||
</span>
|
||||
<%= f.text_field :username, class: "form-control", placeholder: t("administrator.users.table.username"), value: "" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="input-icon">
|
||||
<span class="input-icon-addon">
|
||||
<i class="fas fa-key"></i>
|
||||
</span>
|
||||
<%= f.password_field :password, class: "form-control", placeholder: t("password"), value: "" %>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<%= f.submit t("login"), class: "btn btn-primary btn-block signin-button" %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -37,10 +37,6 @@ module Greenlight
|
|||
config.i18n.available_locales = [:en]
|
||||
config.i18n.default_locale = :en
|
||||
|
||||
config.i18n.available_locales.each do |locale|
|
||||
config.i18n.fallbacks[locale] = [locale, :en]
|
||||
end
|
||||
|
||||
# Check if a loadbalancer is configured.
|
||||
config.loadbalanced_configuration = ENV["LOADBALANCER_ENDPOINT"].present? && ENV["LOADBALANCER_SECRET"].present?
|
||||
|
||||
|
@ -134,6 +130,9 @@ module Greenlight
|
|||
# Default registration method if the user does not specify one
|
||||
config.registration_method_default = config.registration_methods[:open]
|
||||
|
||||
# Default limit on number of rooms users can create
|
||||
config.number_of_rooms_default = 15
|
||||
|
||||
# Default admin password
|
||||
config.admin_password_default = ENV['ADMIN_PASSWORD'] || 'administrator'
|
||||
end
|
||||
|
|
|
@ -84,10 +84,6 @@ Rails.application.configure do
|
|||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
||||
# Send deprecation notices to registered listeners.
|
||||
config.active_support.deprecation = :notify
|
||||
|
||||
|
|
|
@ -49,4 +49,6 @@ Rails.application.configure do
|
|||
# Use standalone BigBlueButton server.
|
||||
config.bigbluebutton_endpoint = config.bigbluebutton_endpoint_default
|
||||
config.bigbluebutton_secret = config.bigbluebutton_secret_default
|
||||
|
||||
config.loadbalanced_configuration = false
|
||||
end
|
||||
|
|
|
@ -10,3 +10,10 @@ locales.each do |loc|
|
|||
end
|
||||
|
||||
Rails.configuration.i18n.available_locales = configured_languages
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
Rails.configuration.i18n.fallbacks = {}
|
||||
Rails.configuration.i18n.available_locales.each do |locale|
|
||||
Rails.configuration.i18n.fallbacks[locale] = :en
|
||||
end
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'office365'
|
||||
|
||||
# List of supported Omniauth providers.
|
||||
Rails.application.config.providers = []
|
||||
|
||||
|
@ -10,19 +12,11 @@ Rails.application.config.omniauth_ldap = ENV['LDAP_SERVER'].present? && ENV['LDA
|
|||
ENV['LDAP_PASSWORD'].present?
|
||||
Rails.application.config.omniauth_twitter = ENV['TWITTER_ID'].present? && ENV['TWITTER_SECRET'].present?
|
||||
Rails.application.config.omniauth_google = ENV['GOOGLE_OAUTH2_ID'].present? && ENV['GOOGLE_OAUTH2_SECRET'].present?
|
||||
Rails.application.config.omniauth_microsoft_office365 = ENV['OFFICE365_KEY'].present? &&
|
||||
ENV['OFFICE365_SECRET'].present?
|
||||
|
||||
# If LDAP is enabled, override and disable allow_user_signup.
|
||||
Rails.application.config.allow_user_signup = false if Rails.application.config.omniauth_ldap
|
||||
Rails.application.config.omniauth_office365 = ENV['OFFICE365_KEY'].present? &&
|
||||
ENV['OFFICE365_SECRET'].present?
|
||||
|
||||
SETUP_PROC = lambda do |env|
|
||||
provider = env['omniauth.strategy'].options[:name]
|
||||
if provider == "google"
|
||||
SessionsController.helpers.google_omniauth_hd env, ENV['GOOGLE_OAUTH2_HD']
|
||||
else
|
||||
SessionsController.helpers.omniauth_options env
|
||||
end
|
||||
SessionsController.helpers.omniauth_options env
|
||||
end
|
||||
|
||||
# Setup the Omniauth middleware.
|
||||
|
@ -30,21 +24,11 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|||
if Rails.configuration.omniauth_bn_launcher
|
||||
provider :bn_launcher, client_id: ENV['CLIENT_ID'],
|
||||
client_secret: ENV['CLIENT_SECRET'],
|
||||
client_options: { site: ENV['BN_LAUNCHER_REDIRECT_URI'] },
|
||||
client_options: { site: ENV['BN_LAUNCHER_URI'] || ENV['BN_LAUNCHER_REDIRECT_URI'] },
|
||||
setup: SETUP_PROC
|
||||
elsif Rails.configuration.omniauth_ldap
|
||||
Rails.application.config.providers << :ldap
|
||||
|
||||
provider :ldap,
|
||||
host: ENV['LDAP_SERVER'],
|
||||
port: ENV['LDAP_PORT'] || '389',
|
||||
method: ENV['LDAP_METHOD'].blank? ? :plain : ENV['LDAP_METHOD'].to_sym,
|
||||
allow_username_or_email_login: true,
|
||||
uid: ENV['LDAP_UID'],
|
||||
base: ENV['LDAP_BASE'],
|
||||
bind_dn: ENV['LDAP_BIND_DN'],
|
||||
password: ENV['LDAP_PASSWORD']
|
||||
else
|
||||
Rails.application.config.providers << :ldap if Rails.configuration.omniauth_ldap
|
||||
|
||||
if Rails.configuration.omniauth_twitter
|
||||
Rails.application.config.providers << :twitter
|
||||
|
||||
|
@ -59,10 +43,11 @@ Rails.application.config.middleware.use OmniAuth::Builder do
|
|||
name: 'google',
|
||||
setup: SETUP_PROC
|
||||
end
|
||||
if Rails.configuration.omniauth_microsoft_office365
|
||||
Rails.application.config.providers << :microsoft_office365
|
||||
if Rails.configuration.omniauth_office365
|
||||
Rails.application.config.providers << :office365
|
||||
|
||||
provider :microsoft_office365, ENV['OFFICE365_KEY'], ENV['OFFICE365_SECRET']
|
||||
provider :office365, ENV['OFFICE365_KEY'], ENV['OFFICE365_SECRET'],
|
||||
setup: SETUP_PROC
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -71,27 +56,3 @@ end
|
|||
OmniAuth.config.on_failure = proc { |env|
|
||||
OmniAuth::FailureEndpoint.new(env).redirect_to_failure
|
||||
}
|
||||
|
||||
# Work around beacuse callback_url option causes
|
||||
# omniauth.auth to be nil in the authhash when
|
||||
# authenticating with LDAP.
|
||||
module OmniAuthLDAPExt
|
||||
def request_phase
|
||||
rel_root = ENV['RELATIVE_URL_ROOT'].present? ? ENV['RELATIVE_URL_ROOT'] : '/b'
|
||||
|
||||
@callback_path = nil
|
||||
path = options[:callback_path]
|
||||
options[:callback_path] = "#{rel_root if Rails.env == 'production'}/auth/ldap/callback"
|
||||
form = super
|
||||
options[:callback_path] = path
|
||||
form
|
||||
end
|
||||
end
|
||||
|
||||
module OmniAuth
|
||||
module Strategies
|
||||
class LDAP
|
||||
prepend OmniAuthLDAPExt
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -93,7 +93,6 @@ ar:
|
|||
video: شاهد برنامجنا التعليمي حول استخدام Greenlight
|
||||
upgrade: أرني كيفية الترقية إلى 2.0!
|
||||
version: لقد أصدرنا إصدارًا جديدًا من Greenlight ، لكن قاعدة البيانات غير متوافقة.
|
||||
language_name: العربية
|
||||
language_default: الافتراضي (لغة المتصفح)
|
||||
ldap_error: غير قادر على الاتصال بخادم LDAP. يرجى التحقق من تكوين LDAP في ملف env والتأكد من تشغيل خادمك.
|
||||
login: الدخول
|
||||
|
@ -156,7 +155,7 @@ ar:
|
|||
password_different_notice: تأكيد كلمة المرور غير متطابق.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recording:
|
||||
email: " البريد الإلكتروني للتسجيل"
|
||||
|
|
|
@ -175,7 +175,6 @@ de_DE:
|
|||
video: Schauen Sie sich unsere Anleitung zur Verwendung von Greenlight an
|
||||
upgrade: "Zeigen Sie mir, wie ich auf Version 2.0. update!"
|
||||
version: "Wir haben eine neue Version von Greenlight veröffentlicht, aber Ihre Datenbank ist damit nicht kompatibel."
|
||||
language_name: Deutsch
|
||||
language_default: Voreinstellung (Browsersprache)
|
||||
ldap_error: "Verbindung zum LDAP Server konnte nicht hergestellt werden. Bitte überprüfen Sie die LDAP Konfiguration und stellen Sie sicher, dass der LDAP-Server läuft."
|
||||
login: Einloggen
|
||||
|
@ -190,7 +189,7 @@ de_DE:
|
|||
info: Ein neuer Nutzer hat sich bei Greenlight angemeldet.
|
||||
more-info: "Um diesem Nutzer Zugriff auf Greenlight zu geben, müssen Sie seinen Account in den Organisationseinstellungen genehmigen."
|
||||
admins_link: Organisationsseite besuchen
|
||||
subject: Neue Greenlight Nutzerregistierung
|
||||
subject: Neue Greenlight Nutzerregistierung
|
||||
username: "Der Nutzer hat sich mit dem Namen %{name} und der Email %{email} registiert."
|
||||
subject: Account genehmigt
|
||||
username: "Ihr Nutzername ist %{email}."
|
||||
|
@ -206,7 +205,7 @@ de_DE:
|
|||
signup:
|
||||
info: Ein Nutzer hat Sie dazu eingeladen sich für die Nutzung von Greenlight zu registieren.
|
||||
admins_link: Organisationsseite besuchen
|
||||
subject: Registierung neuer Greenlight-Nutzer
|
||||
subject: Registierung neuer Greenlight-Nutzer
|
||||
username: "Der Nutzer hat sich mit dem Namen %{name} und der Email %{email} registriert."
|
||||
subject: Einladung zur BigBlueButton-Teilnahme
|
||||
username: "Ihr Nutzername ist %{email}."
|
||||
|
@ -285,7 +284,7 @@ de_DE:
|
|||
password_different_notice: Passwortbestätigung ist nicht zutreffend.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -311,11 +310,11 @@ de_DE:
|
|||
format:
|
||||
presentation: Präsentation
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: "Ihr Account wurde noch nicht freigeschaltet. Falls Sie sich bereits vor mehreren Tagen registriert haben, kontaktieren Sie bitte Ihren Administrator."
|
||||
signup: Ihr Account wurde erfolgreich erzeugt. Er muss noch durch einen Administrator freigeschaltet werden.
|
||||
banned:
|
||||
fail: "Sie haben keinen Zugriff auf dieses Applikation. Falls Sie denken, dass hier ein Fehler vorliegt, kontaktieren Sie bitte Ihren Administrator."
|
||||
fail: "Sie haben keinen Zugriff auf dieses Applikation. Falls Sie denken, dass hier ein Fehler vorliegt, kontaktieren Sie bitte Ihren Administrator."
|
||||
invite:
|
||||
fail: "Ihr Token ist entweder ungültig oder er ist abgelaufen. Falls Sie denken, dass hier ein Fehler vorliegt, kontaktieren Sie bitte Ihren Administrator."
|
||||
no_invite: "Sie sind nicht zu Teilnahme eingeladen. Bitte kontaktieren Sie Ihren Administrator, um eine Einladung zu erhalten."
|
||||
|
|
|
@ -69,7 +69,6 @@ el:
|
|||
video: Παρακολουθήστε το σεμινάριο μας σχετικά με τη χρήση του Greenlight
|
||||
upgrade: Δείξε μου πώς να αναβαθμίσω σε 2.0!
|
||||
version: "Έχουμε κυκλοφορήσει μια νέα έκδοση του Greenlight, αλλά η βάση δεδομένων σας δεν είναι συμβατή."
|
||||
language_name: Ελληνικά
|
||||
ldap_error: Δεν είναι δυνατή η σύνδεση με το διακομιστή LDAP. Ελέγξτε τη διαμόρφωση του LDAP στο αρχείο env και βεβαιωθείτε ότι ο διακομιστής σας εκτελείται.
|
||||
login: Σύνδεση
|
||||
modal:
|
||||
|
|
|
@ -21,6 +21,14 @@ en:
|
|||
attributes:
|
||||
user:
|
||||
accepted_terms: "Terms and Conditions"
|
||||
email: Email
|
||||
name: Name
|
||||
password: Password
|
||||
password_confirmation: Password Confirmation
|
||||
errors:
|
||||
models:
|
||||
user:
|
||||
confirmation: doesn't match Password
|
||||
administrator:
|
||||
site_settings:
|
||||
authentication:
|
||||
|
@ -47,6 +55,9 @@ en:
|
|||
approval: Approve/Decline
|
||||
invite: Join by Invitation
|
||||
open: Open Registration
|
||||
rooms:
|
||||
info: Limits the number of rooms that a user can have (including Home Room). This setting does not apply to administrators.
|
||||
title: Number of Rooms per User
|
||||
subtitle: Customize Greenlight
|
||||
title: Site Settings
|
||||
flash:
|
||||
|
@ -68,6 +79,8 @@ en:
|
|||
edit:
|
||||
title: Edit User Details
|
||||
settings:
|
||||
approve: Approve
|
||||
decline: Decline
|
||||
ban: Ban User
|
||||
delete: Delete
|
||||
demote: Demote to User
|
||||
|
@ -106,7 +119,7 @@ en:
|
|||
message: Invalid BigBlueButton Endpoint and Secret
|
||||
title: Server Error
|
||||
internal:
|
||||
message: Oh no! Looks like something went wrong on our end.
|
||||
message: Looks like something went wrong on our end.
|
||||
help: The error has been logged, we'll take a look!
|
||||
migration_error:
|
||||
contact_admin: If you are not an administrator, please contact one.
|
||||
|
@ -125,15 +138,18 @@ en:
|
|||
confirmation: doesn't match %{attribute}
|
||||
inclusion: is not included in the list
|
||||
not_found:
|
||||
message: Whoops! Looks like we can't find that.
|
||||
message: Sorry! The page you are looking for does not exist.
|
||||
help: Is it possible its been removed?
|
||||
user_not_found:
|
||||
help: Please contact an administrator.
|
||||
message: Sorry, this user is not registered.
|
||||
user_missing:
|
||||
help: Please verify the URL and try again
|
||||
message: The URL that you have entered is not valid.
|
||||
title: Errors
|
||||
unauthorized:
|
||||
message: You do not have access to this application
|
||||
help: If you believe this is a mistake, please contact your system administrator.
|
||||
unprocessable:
|
||||
message: Oops! Request is unprocessable.
|
||||
help: Unfortunately this isn't a valid request.
|
||||
expired_reset_token: Password reset link has expired!
|
||||
features:
|
||||
title: Features
|
||||
|
@ -176,7 +192,6 @@ en:
|
|||
video: Watch our tutorial on using Greenlight
|
||||
upgrade: Show me how to upgrade to 2.0!
|
||||
version: We've released a new version of Greenlight, but your database isn't compatible.
|
||||
language_name: English
|
||||
language_default: Default (browser language)
|
||||
ldap_error: Unable to connect to the LDAP server. Please check your LDAP configuration in the env file and ensure your server is running.
|
||||
login: Sign in
|
||||
|
@ -191,7 +206,7 @@ en:
|
|||
info: A new user has signed up to use Greenlight.
|
||||
more-info: To allow this user to access Greenlight you must approve their account in organization settings.
|
||||
admins_link: Visit the Organization Page
|
||||
subject: New Greenlight User Sign Up
|
||||
subject: New Greenlight User Sign Up
|
||||
username: The user signed up with the name %{name} and the email %{email}.
|
||||
subject: Account Approved
|
||||
username: Your username is %{email}.
|
||||
|
@ -202,12 +217,12 @@ en:
|
|||
subtitle: Administrator Rights Rescinded
|
||||
invite:
|
||||
info: You have been invited to your own personal space by %{name}
|
||||
signup: To signup using your email, click the button below and follow the steps.
|
||||
signup_info: To signup using your email, click the button below and follow the steps.
|
||||
signup_link: Sign Up
|
||||
signup:
|
||||
info: A user that was invited has signed up to use Greenlight.
|
||||
admins_link: Visit the Organization Page
|
||||
subject: New Greenlight User Sign Up
|
||||
subject: New Greenlight User Sign Up
|
||||
username: The user signed up with the name %{name} and the email %{email}.
|
||||
subject: Invitation to join BigBlueButton
|
||||
username: Your username is %{email}.
|
||||
|
@ -286,8 +301,9 @@ en:
|
|||
password_different_notice: Password Confirmation does not match.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
ldap: LDAP
|
||||
recaptcha:
|
||||
errors:
|
||||
recaptcha_unreachable: Oops, we failed to validate your reCAPTCHA response. Please try again.
|
||||
|
@ -312,11 +328,15 @@ en:
|
|||
format:
|
||||
presentation: Presentation
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: Your account has not been approved yet. If multiples days have passed since you signed up, please contact your administrator.
|
||||
signup: Your account was successfully created. It has been sent to an administrator for approval.
|
||||
banned:
|
||||
fail: You do not have access to this application. If you believe this is a mistake, please contact your administrator.
|
||||
deprecated:
|
||||
new_signin: Select a new login method for you account. All your rooms from your old account will be migrated to the new account
|
||||
twitter_signin: Signing in via Twitter has been deprecated and will be removed in the next release. Click <a href="%{link}"> here </a> to move your account to a new authentication method
|
||||
twitter_signup: Sign up via Twitter has been deprecated. Please use a different sign up method
|
||||
invite:
|
||||
fail: Your token is either invalid or has expired. If you believe this is a mistake, please contact your administrator.
|
||||
no_invite: You do not have an invitation to join. Please contact your administrator to receive one.
|
||||
|
@ -343,6 +363,8 @@ en:
|
|||
owner: Owner
|
||||
no_sessions: This room has no sessions, yet!
|
||||
recordings: Room Recordings
|
||||
room_limit: You have reached the maximum number of rooms allowed
|
||||
room_limit_exceeded: You have exceeded the number of rooms allowed. Please delete %{difference} room(s) to access this room.
|
||||
sessions: Sessions
|
||||
settings: Room Settings
|
||||
start: Start
|
||||
|
|
|
@ -175,7 +175,6 @@ es:
|
|||
video: Ve nuestro tutorial de como utilizar Greenlight
|
||||
upgrade: Muestrame como actualizar a versión 2.0
|
||||
version: Hemos publicado una nueva version de Greenlight pero tu base de datos no es compatible.
|
||||
language_name: Español
|
||||
language_default: Por omisión (idioma del navegador)
|
||||
ldap_error: No se puede conectar al servidor LDAP. Compruebe la configuración de LDAP en el archivo "env" y asegúrate de que tu servidor está ejecutándose.
|
||||
login: Ingresar
|
||||
|
@ -190,7 +189,7 @@ es:
|
|||
info: Se ha registrado un usuario nuevo.
|
||||
more-info: Para permitir el acceso de este usuario debes aprobar su cuenta de usuario a través de la configuración de la organización.
|
||||
admins_link: Ir a la página de la organización
|
||||
subject: Registro de usuario nuevo
|
||||
subject: Registro de usuario nuevo
|
||||
username: "El usuario se ha registrado como %{name} con el email %{email}."
|
||||
subject: Cuenta de usuario autorizada
|
||||
username: "Tu nombre de usuario es %{email}"
|
||||
|
@ -206,7 +205,7 @@ es:
|
|||
signup:
|
||||
info: Un usuario que fue invitado a registrarse ha completado su registro.
|
||||
admins_link: Ir a la página de la organización
|
||||
subject: Registro de usuario nuevo
|
||||
subject: Registro de usuario nuevo
|
||||
username: "El usuario se ha registrado como %{name} con el email %{email}."
|
||||
subject: Invitación a ingresar a BigBlueButton
|
||||
username: "Tu nombre de usuario es %{email}."
|
||||
|
@ -285,7 +284,7 @@ es:
|
|||
password_different_notice: La confirmación de password no coincide
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -311,11 +310,11 @@ es:
|
|||
format:
|
||||
presentation: Presentación
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: "Tú cuenta de usuario todavía no ha sido autorizada. Si han pasado varios días desde tú registro, te sugerimos contactar al administrador."
|
||||
signup: Tú cuenta de usuario ha sido creada y se le ha enviado una notificación al administrador para su autorización.
|
||||
banned:
|
||||
fail: "No tienes acceso a esta aplicación. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
fail: "No tienes acceso a esta aplicación. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
invite:
|
||||
fail: "Tu código ha expirado o es invalido. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
no_invite: No tienes una invitación para ingresar. Contacta al administrador del sistema para obtener una.
|
||||
|
|
|
@ -175,7 +175,6 @@ es_MX:
|
|||
video: Ve nuestro tutorial de como utilizar Greenlight
|
||||
upgrade: Muestrame como actualizar a versión 2.0
|
||||
version: Hemos publicado una nueva version de Greenlight pero tu base de datos no es compatible.
|
||||
language_name: Español (México)
|
||||
language_default: Por omisión (idioma del navegador)
|
||||
ldap_error: No se puede conectar al servidor LDAP. Compruebe la configuración de LDAP en el archivo "env" y asegúrate de que tu servidor está ejecutándose.
|
||||
login: Ingresar
|
||||
|
@ -190,7 +189,7 @@ es_MX:
|
|||
info: Se ha registrado un usuario nuevo.
|
||||
more-info: Para permitir el acceso de este usuario debes aprobar su cuenta de usuario a través de la configuración de la organización.
|
||||
admins_link: Ir a la página de la organización
|
||||
subject: Registro de usuario nuevo
|
||||
subject: Registro de usuario nuevo
|
||||
username: "El usuario se ha registrado como %{name}con el email %{email}."
|
||||
subject: Cuenta de usuario autorizada
|
||||
username: "Tu nombre de usuario es %{email}."
|
||||
|
@ -206,7 +205,7 @@ es_MX:
|
|||
signup:
|
||||
info: Un usuario que fue invitado a registrarse ha completado su registro.
|
||||
admins_link: Ir a la página de la organización
|
||||
subject: Registro de usuario nuevo
|
||||
subject: Registro de usuario nuevo
|
||||
username: "El usuario se ha registrado como%{name} con el email %{email}. "
|
||||
subject: Invitación a ingresar a BigBlueButton
|
||||
username: "Tu nombre de usuario es %{email}."
|
||||
|
@ -285,7 +284,7 @@ es_MX:
|
|||
password_different_notice: La confirmación de password no coincide
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -311,11 +310,11 @@ es_MX:
|
|||
format:
|
||||
presentation: Presentación
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: "Tú cuenta de usuario todavía no ha sido autorizada. Si han pasado varios días desde tú registro, te sugerimos contactar al administrador."
|
||||
signup: Tú cuenta de usuario ha sido creada y se le ha enviado una notificación al administrador para su autorización.
|
||||
banned:
|
||||
fail: "No tienes acceso a esta aplicación. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
fail: "No tienes acceso a esta aplicación. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
invite:
|
||||
fail: "Tu código ha expirado o es invalido. Sí tu crees que este es un error, contacta al administrador del sistema."
|
||||
no_invite: No tienes una invitación para ingresar. Contacta al administrador del sistema para obtener una.
|
||||
|
|
|
@ -175,7 +175,6 @@ fa_IR:
|
|||
video: ویدئوی آموزشی ما را در مورد استفاده از گرین لایت مشاهده کنید
|
||||
upgrade: به من نشان بده چگونه به نسخه 2.0 به روز رسانی کنم!
|
||||
version: ما یک نسخه جدید از گرین لایت را منتشر کرده ایم، اما پایگاه داده شما با آن سازگاری ندارد.
|
||||
language_name: انگلیسی
|
||||
language_default: پیشفرض (زبان مرورگر)
|
||||
ldap_error: امکان دسترسی به سرور LDAP وجود ندارد. لطفا تنظیمات LDAP خود را در فایل env بررسی کرده و مطمئن شوید سرور در حال اجرا است.
|
||||
login: ورود
|
||||
|
@ -190,7 +189,7 @@ fa_IR:
|
|||
info: یک کاربر جدید در گرین لایت ثبت نامه کرده است
|
||||
more-info: برای داشتن مجوز دسترسی برای این کاربر به گرین لایت، شما می بایست حساب کاربری آن ها را در تنظیمات سازمان تایید کنید.
|
||||
admins_link: مشاهده صفحه سازمان
|
||||
subject: ثبت نام کاربر جدید گرین لایت
|
||||
subject: ثبت نام کاربر جدید گرین لایت
|
||||
username: "کاربر با نام %{name} و ادرس ایمیل %{email} ثبت نام کرده است."
|
||||
subject: حساب کاربری تایید شد
|
||||
username: "نام کاربری شما %{email} است."
|
||||
|
@ -206,7 +205,7 @@ fa_IR:
|
|||
signup:
|
||||
info: کاربری که دعوت کرده بودید برای استفاده از گرین لایت ثبت نام کرده است.
|
||||
admins_link: صفحه سازمان را مشاهده کنید
|
||||
subject: ثبت نام کاربر گرین لایت جدید
|
||||
subject: ثبت نام کاربر گرین لایت جدید
|
||||
username: "کاربر با نام %{name} و ادرس ایمیل %{email} ثبت نام کرده است."
|
||||
subject: دعوت نامه برای پیوستن به بیگ بلو باتن
|
||||
username: "نام کاربری شما %{email} است."
|
||||
|
@ -284,7 +283,7 @@ fa_IR:
|
|||
password_different_notice: تاییدیه رمز عبور با رمز ارائه شده مطابقت ندارد.
|
||||
provider:
|
||||
google: گوگل
|
||||
microsoft_office365: افیس 365
|
||||
office365: افیس 365
|
||||
twitter: توییتر
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -310,11 +309,11 @@ fa_IR:
|
|||
format:
|
||||
presentation: ارائه
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: حساب کاربری شما هنوز تایید نشده است. اگر چند روز از ثبت نام شما گذشته است، لطفا با مدیر خود تماس بگیرید.
|
||||
signup: حساب کاربری شما با موفقیت ایجاد شد و برای تایید به مدیر ارسال شد.
|
||||
banned:
|
||||
fail: شما دسترسی به این برنامه ندارید. اگر فکر میکنید این اشتباه است، لطفا با مدیر سیستم خود تماس بگیرید
|
||||
fail: شما دسترسی به این برنامه ندارید. اگر فکر میکنید این اشتباه است، لطفا با مدیر سیستم خود تماس بگیرید
|
||||
invite:
|
||||
fail: توکن شما به اتمام رسیده یا اشتباه است. اگر فک میکنید این اشتباه است، لطفا با مدیر سیستم خود تماس بگیرید
|
||||
no_invite: شما دعوت نامه ای برای ورود ندارید، لطفا برای دریافت آن با مدیر تماس بگیرید.
|
||||
|
|
|
@ -93,7 +93,6 @@ fr:
|
|||
video: Regardez notre tutoriel sur l'utilisation de Greenlight
|
||||
upgrade: Montrez-moi comment passer à la version 2.0 !
|
||||
version: "Nous avons publié une nouvelle version de Greenlight, mais votre base de données n'est pas compatible."
|
||||
language_name: Française
|
||||
language_default: Par défaut (langue du navigateur)
|
||||
ldap_error: Impossible de se connecter au serveur LDAP. Veuillez vérifier votre configuration LDAP dans le fichier env et vous assurer que votre serveur est en cours d'exécution.
|
||||
login: Connexion
|
||||
|
@ -156,7 +155,7 @@ fr:
|
|||
password_different_notice: La confirmation du mot de passe ne correspond pas.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recording:
|
||||
email: Envoyer l'enregistrement par Email
|
||||
|
|
|
@ -93,7 +93,6 @@ hi_IN:
|
|||
video: ग्रीनलाइट का उपयोग करने पर हमारा ट्यूटोरियल देखें
|
||||
upgrade: मुझे 2.0 में अपग्रेड करने का तरीका दिखाएं!
|
||||
version: "हमने ग्रीनलाइट का एक नया संस्करण जारी किया है, लेकिन आपका डेटाबेस संगत नहीं है !"
|
||||
language_name: अंग्रेज़ी
|
||||
language_default: डिफ़ॉल्ट (ब्राउज़र भाषा)
|
||||
ldap_error: LDAP सर्वर से कनेक्ट करने में असमर्थ। कृपया env फ़ाइल में अपना LDAP कॉन्फ़िगरेशन जांचें और सुनिश्चित करें कि आपका सर्वर चल रहा है।
|
||||
login: प्रवेश करने देना
|
||||
|
@ -156,7 +155,7 @@ hi_IN:
|
|||
password_different_notice: पासवर्ड की पुष्टि मेल नहीं खाती।
|
||||
provider:
|
||||
google: गूगल
|
||||
microsoft_office365: ऑफिस 365
|
||||
office365: ऑफिस 365
|
||||
twitter: ट्विटर
|
||||
recording:
|
||||
email: ईमेल रिकॉर्डिंग
|
||||
|
|
|
@ -175,7 +175,6 @@ hu_HU:
|
|||
video: Nézd meg az ismertetőnket a Greenlight használatáról
|
||||
upgrade: "Mutasd, hogyan tudok frissíteni a 2.0-ás verzióra!"
|
||||
version: "A Greenlight új verziója jelent meg, de az adatbázisod nem kompatibilis."
|
||||
language_name: Angol
|
||||
language_default: Alapértelmezett (a böngésző nyelve)
|
||||
ldap_error: "Nem sikerült csatlakozni az LDAP szerverhez. Kérjük, ellenőrizd a beállításokat a környezeti, env fájlban, illetve azt, hogy a szerver működik és elérhető."
|
||||
login: Bejelentkezés
|
||||
|
@ -190,7 +189,7 @@ hu_HU:
|
|||
info: "Egy új felhasználó regisztrált, hogy használhassa a Greenlight-ot."
|
||||
more-info: "Ahhoz, hogy ez a felhasználó elérhesse a Greenlight-ot, a szervezheti beállításokban hozzá kell rendelned."
|
||||
admins_link: A Szervezeti oldal megtekintése
|
||||
subject: Új Greenlight felhasználó regisztrált
|
||||
subject: Új Greenlight felhasználó regisztrált
|
||||
username: "A felhasználó %{name} felhasználónévvel, %{email} e-mail címmel regisztrált."
|
||||
subject: Jóváhagyott fiók
|
||||
username: "A felhasználóneved %{email}."
|
||||
|
@ -206,7 +205,7 @@ hu_HU:
|
|||
signup:
|
||||
info: "Egy meghívott felhasználó regisztrált, hogy használhassa a Greenlight-ot."
|
||||
admins_link: A Szervezeti oldal megtekintése
|
||||
subject: Új Greenlight felhasználó regisztrált
|
||||
subject: Új Greenlight felhasználó regisztrált
|
||||
username: "A felhasználó %{name} felhasználónévvel, %{email} e-mail címmel regisztrált."
|
||||
subject: Meghívás a BigBlueButton használatára
|
||||
username: "A felhasználóneved %{email}."
|
||||
|
@ -284,7 +283,7 @@ hu_HU:
|
|||
password_different_notice: A két új jelszó eltér egymástól.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -310,11 +309,11 @@ hu_HU:
|
|||
format:
|
||||
presentation: Prezentáció
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: "A fiókodat még nem hagyták jóvá. Ha már többi nap eltelt a regisztrációd óta, lépj kapcsolatba az üzemeltetőkkel."
|
||||
signup: "A fiókodat sikeresen létrehoztuk, várunk az üzemeltető jóváhagyására."
|
||||
banned:
|
||||
fail: "Nincs hozzáférésed ehhez az alkalmazáshoz. Amennyiben úgy gondolod, hogy ez egy hiba, kérjük, jelezd az üzemeltetőnek."
|
||||
fail: "Nincs hozzáférésed ehhez az alkalmazáshoz. Amennyiben úgy gondolod, hogy ez egy hiba, kérjük, jelezd az üzemeltetőnek."
|
||||
invite:
|
||||
fail: "A tokened nem érvényes vagy lejárt. Amennyiben úgy gondolod, hogy ez egy hiba, kérjük, jelezd az üzemeltetőnek."
|
||||
no_invite: Neked nem küldtünk meghívót. Kérhetsz egyet az üzemeltetőktől.
|
||||
|
|
|
@ -23,26 +23,48 @@ it:
|
|||
accepted_terms: "Termini e condizioni"
|
||||
administrator:
|
||||
site_settings:
|
||||
authentication:
|
||||
disabled: Disabilitato
|
||||
enabled: Abilitato
|
||||
info: Permettere l'accesso solo ad utenti autenticati
|
||||
title: Richiedi autenticazione per ogni stanza
|
||||
user-info: Devi registrarti ad DENTAL LIVE Manager per accedere alla stanza
|
||||
branding:
|
||||
change: Cambia immagine
|
||||
info: Cambia il logo del brand che appare nell'angolo in alto a sinistra
|
||||
placeholder: Indirizzo immagine...
|
||||
title: Logo
|
||||
color:
|
||||
info: Cambia il colore primario usato nel sito
|
||||
info: "Cambiando il valore del colore di base, verranno cambiati sia la versione chiara che scura. Le due versioni possono essere modificate individualmente"
|
||||
title: Colore primario
|
||||
regular: Colore di base
|
||||
lighten: Chiaro
|
||||
Darken: Scuro
|
||||
registration:
|
||||
info: Cambiare il modo in cui gli utenti si registrano al sito web
|
||||
title: Metodo di registrazione
|
||||
methods:
|
||||
approval: Approva/Rifiuta
|
||||
invite: Accesso tramite invito
|
||||
open: Registrazione libera
|
||||
subtitle: Personalizza Greenlight
|
||||
title: Impostazioni Sito
|
||||
flash:
|
||||
approved: L'utente è stato approvato con successo
|
||||
banned: L'utente è stato bannato.
|
||||
unbanned: E' stato tolto il blocco utente.
|
||||
delete: L'utente è stato eliminato con successo
|
||||
delete_fail: Errore nell'eliminazione utente
|
||||
demoted: L'utente è stato declassato
|
||||
invite: "L'invito è stato inviato a %{email}"
|
||||
invite_email_verification: ""
|
||||
promoted: L'utente è stato promosso
|
||||
registration_method_updated: Il metodo di registrazione è stato aggiornato con successo
|
||||
settings: Le impostazioni web sono state modificate con successo
|
||||
unauthorized: Non sei autorizzato ad effettuare modifiche sull'utente
|
||||
title: Impostazioni dell'organizzazione
|
||||
users:
|
||||
invite: Invita utente
|
||||
edit:
|
||||
title: Modifica dettagli utente
|
||||
settings:
|
||||
|
@ -79,6 +101,10 @@ it:
|
|||
email_sent: "La tua email di %{email_type} è stata inviata! (Controlla nella cartella Spam della tua email se non la ricevi)"
|
||||
enter_your_name: Inserisci il tuo nome!
|
||||
errors:
|
||||
bigbluebutton:
|
||||
help: "Per favore, assicurarsi di aver completato tutti i passaggi. <a href=\"%{doc_link}\">Altre informazioni</a>"
|
||||
message: "Impostazioni di collegamento, Endpoint e Secret, errati"
|
||||
title: Errore del server
|
||||
internal:
|
||||
message: Diamine! Sembra che qualcosa non funzioni qui da noi.
|
||||
help: "L'errore è stato salvato, abbiamo inviato un gruppo di scimmie per risolvere il problema."
|
||||
|
@ -149,13 +175,40 @@ it:
|
|||
video: Guarda il tutorial sull'utilizzo di GreenLight
|
||||
upgrade: Mostrami come aggiornare alla versione 2.0!
|
||||
version: "E' stata rilasciata una nuova versione di GreenLight, ma il tuo database non è compatibile."
|
||||
language_name: Inglese
|
||||
language_default: Predefinito (linguaggio del browser)
|
||||
ldap_error: Impossibile collegarsi al server LDAP. Controlla la configurazione LDAP nel file env e assicurati che il server sia attivo.
|
||||
login: Entra
|
||||
login_title: Entra nel tuo account
|
||||
mailer:
|
||||
user:
|
||||
approve:
|
||||
info: Il tuo account è stato approvato.
|
||||
signin: "Per accedere alle stanze personali, clicca sul bottone in basso ed effettua il login"
|
||||
signin_link: Entra
|
||||
signup:
|
||||
info: "Un nuovo utente si è registrato "
|
||||
more-info: ""
|
||||
admins_link: ""
|
||||
subject: ""
|
||||
username: ""
|
||||
subject: ""
|
||||
username: ""
|
||||
demoted:
|
||||
info: ""
|
||||
more-info: ""
|
||||
root_link: ""
|
||||
subtitle: ""
|
||||
invite:
|
||||
info: ""
|
||||
signup: To signup using your email, click the button below and follow the steps.
|
||||
signup_link: ""
|
||||
signup:
|
||||
info: ""
|
||||
admins_link: ""
|
||||
subject: ""
|
||||
username: ""
|
||||
subject: ""
|
||||
username: ""
|
||||
password_reset:
|
||||
title: 'Reimposta password'
|
||||
welcome: "Sembra che tu abbia dimenticato la password per %{bigbluebutton}"
|
||||
|
@ -163,6 +216,11 @@ it:
|
|||
reset_link: Reimposta Password
|
||||
expire: Questo link scadrà tra 2 ore.
|
||||
ignore: Se non hai richiesto tu di reimpostare la password puoi ignorare questa email.
|
||||
promoted:
|
||||
admins_link: ""
|
||||
info: ""
|
||||
more-info: ""
|
||||
subtitle: ""
|
||||
verify_email:
|
||||
welcome: "Benvenuti nel vostro spazio personale, %{name}!"
|
||||
success: "Supporta %{bigbluebutton}, puoi creare le tue stanze e ospitare meeting per collaborare con altri utenti."
|
||||
|
@ -189,7 +247,13 @@ it:
|
|||
confirm: "Sicuro di voler eliminare %{room}?"
|
||||
delete: "Sono sicuro, elimina la stanza."
|
||||
keep: "Ripensandoci, penso che la terrò."
|
||||
warning: "<b>Non</b> potrai recuperare questa stanza e le relative %{recordings_num} registrazioni salvate."
|
||||
warning: ""
|
||||
recording_warning: ""
|
||||
invite_user:
|
||||
email_placeholder: ""
|
||||
footer: ""
|
||||
send: ""
|
||||
title: ""
|
||||
login:
|
||||
or: o
|
||||
with: "Entra con %{provider}"
|
||||
|
@ -220,7 +284,7 @@ it:
|
|||
password_different_notice: La conferma della password non coincide.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -245,6 +309,15 @@ it:
|
|||
unlisted: Non in elenco
|
||||
format:
|
||||
presentation: Presentazione
|
||||
registration:
|
||||
approval:
|
||||
fail: ""
|
||||
signup: ""
|
||||
banned:
|
||||
fail: ""
|
||||
invite:
|
||||
fail: ""
|
||||
no_invite: ""
|
||||
rename: Rinomina
|
||||
reset_password:
|
||||
subtitle: Reimposta password
|
||||
|
@ -254,6 +327,7 @@ it:
|
|||
roles:
|
||||
administrator: Amministratore
|
||||
banned: Bloccato
|
||||
pending: ""
|
||||
super_admin: Super Amministratore
|
||||
user: Utente
|
||||
room:
|
||||
|
@ -274,7 +348,7 @@ it:
|
|||
update_settings_error: Si è verificato un errore nell'aggiornamento dei dettagli della stanza
|
||||
update_settings_success: Impostazioni della stanza aggiornate correttamente
|
||||
wait:
|
||||
message: Il meeting non è ancora cominciato.
|
||||
message: ""
|
||||
auto: Verrai inserito nella stanza non appena il meeting avrà inizio.
|
||||
settings:
|
||||
account:
|
||||
|
|
|
@ -1,322 +0,0 @@
|
|||
# BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
|
||||
#
|
||||
# Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under the
|
||||
# terms of the GNU Lesser General Public License as published by the Free Software
|
||||
# Foundation; either version 3.0 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public License along
|
||||
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Locale.
|
||||
|
||||
it_IT:
|
||||
activerecord:
|
||||
attributes:
|
||||
user:
|
||||
accepted_terms: "Termini e condizioni"
|
||||
administrator:
|
||||
site_settings:
|
||||
branding:
|
||||
change: Cambia immagine
|
||||
info: Cambia il logo del brand che appare nell'angolo in alto a sinistra
|
||||
placeholder: Indirizzo immagine...
|
||||
title: Logo
|
||||
color:
|
||||
info: Cambia il colore primario usato nel sito
|
||||
title: Colore primario
|
||||
subtitle: Personalizza Greenlight
|
||||
title: Impostazioni Sito
|
||||
flash:
|
||||
banned: L'utente è stato bannato.
|
||||
unbanned: E' stato tolto il blocco utente.
|
||||
delete: L'utente è stato eliminato con successo
|
||||
delete_fail: Errore nell'eliminazione utente
|
||||
demoted: L'utente è stato declassato
|
||||
promoted: L'utente è stato promosso
|
||||
unauthorized: Non sei autorizzato ad effettuare modifiche sull'utente
|
||||
title: Impostazioni dell'organizzazione
|
||||
users:
|
||||
edit:
|
||||
title: Modifica dettagli utente
|
||||
settings:
|
||||
ban: Blocca utente
|
||||
delete: Elimina
|
||||
demote: Declassa utente
|
||||
edit: Modifica
|
||||
promote: Rendi amministratore
|
||||
unban: Sblocca utente
|
||||
table:
|
||||
authenticator: Gestore di autenticazione
|
||||
created: Creato
|
||||
name: Nome
|
||||
not_found: Nessun utente corrisponde alla ricerca
|
||||
no_users: Nessun utente trovato
|
||||
role: Ruolo
|
||||
uid: ID Utente
|
||||
username: Nome utente
|
||||
title: Gestisci utenti
|
||||
add_to_google_calendar: "Aggiungi a Google Calendar"
|
||||
bigbluebutton: GrandeBottoneBlu
|
||||
bigbluebutton_exception: "Dannazione, c'è stato un errore nell'avvio del meeting!"
|
||||
cancel: Annulla
|
||||
cookies:
|
||||
cookie_info: "I Cookies aiutano a fornire i servizi personalizzati. Usando i nostri servizi, accetti di usare i nostri Cookies."
|
||||
cookie_button: Accetto
|
||||
copied: Copiato
|
||||
copy: Copia
|
||||
default_admin: "Stai utilizzando la password di default per l'account. Clicca <a href=\"%{edit_link}\">qui</a> per cambiarla"
|
||||
delete: Elimina
|
||||
delivery_error: Si è verificato un'errore nella consegna della mail. Contatta un amministratore!
|
||||
docs: Documentazione
|
||||
email: Email
|
||||
email_sent: "La tua email di %{email_type} è stata inviata! (Controlla nella cartella Spam della tua email se non la ricevi)"
|
||||
enter_your_name: Inserisci il tuo nome!
|
||||
errors:
|
||||
internal:
|
||||
message: Diamine! Sembra che qualcosa non funzioni qui da noi.
|
||||
help: "L'errore è stato salvato, abbiamo inviato un gruppo di scimmie per risolvere il problema."
|
||||
migration_error:
|
||||
contact_admin: "Non sei un amministratore, dovresti contattarne uno serio."
|
||||
continue: Voglio restare con la verisione 1.0.
|
||||
notice: >
|
||||
Si è verificato un errore nella migrazione del database di GreenLight. <br> Questo può essere perché non hai aggiornato alla versione 2.0.
|
||||
upgrade: Mostrami come aggiornare alla versione 2.0!
|
||||
version: Abbiamo rilasciato una nuova versione di GreenLight ma il tuo database non sembra essere compatibile.
|
||||
messages:
|
||||
blank: non può essere vuoto
|
||||
too_short: è troppo corto
|
||||
invalid: non è valido
|
||||
taken: è stato già utilizzato
|
||||
accepted: devono essere accettati
|
||||
confirmation: "non corrisponde a %{attribute}"
|
||||
inclusion: non è nella lista
|
||||
not_found:
|
||||
message: Maledizione! Non riusciamo a trovarlo.
|
||||
help: "Possibile che sia stato rimosso?"
|
||||
title: Errori
|
||||
unauthorized:
|
||||
message: Non hai accesso a questa applicazione
|
||||
help: "Se credi che sia un errore, contatta il tuo amministratore."
|
||||
unprocessable:
|
||||
message: Cavolo! Non possiamo processare la richiesta.
|
||||
help: Sfortunatamente non è una richiesta valida.
|
||||
expired_reset_token: Il link per il reset della password è scaduto!
|
||||
features:
|
||||
title: Caratteristiche
|
||||
rooms: Stanze personalizzate
|
||||
recordings: Gestione delle registrazioni
|
||||
designs: Grafiche personalizzate
|
||||
authentication: Autenticazione Utente
|
||||
footer:
|
||||
powered_by: "Questo progetto utilizza %{href}."
|
||||
forgot_password:
|
||||
subtitle: Password dimenticata
|
||||
email: Email
|
||||
submit: Invia
|
||||
go_back: Indietro
|
||||
greenlight: LuceVerde
|
||||
header:
|
||||
all_recordings: Tutte le Registrazioni
|
||||
dropdown:
|
||||
account_settings: Organizzazione
|
||||
help: "Ti serve aiuto?"
|
||||
home: Principale
|
||||
settings: Profilo
|
||||
signout: Esci
|
||||
home_room: Stanza principale
|
||||
info_update_success: Le informazioni sono state aggiornate.
|
||||
invalid_user: "Accesso fallito: utente non trovato. Sicuro che l'email sia corretta?"
|
||||
invalid_credentials: "Accesso fallito: credenziali errate. Sicuro che le credenziali siano corrette?"
|
||||
invalid_login_method: "Accesso fallito: account non corretto. Devi effettuare l'accesso con omniauth."
|
||||
invite_message: "Per invitare qualcuno a partecipare, inviagli questo link: "
|
||||
javascript:
|
||||
room:
|
||||
mailer:
|
||||
subject: 'ti ha mandato un invito per visualizzare una registrazione.'
|
||||
body: 'Per visualizzare la registrazione, clicca su questo link: '
|
||||
autogenerated: 'Questa email è stata generata automaticamente da BigBlueButton.'
|
||||
footer: 'BigBlueButton è un sistema di videoconferenza basato su software libero. Per maggiori informazioni su BigBlueButton, visita https://bigbluebutton.org/.'
|
||||
landing:
|
||||
about: "%{href} è una semplice interfaccia per il software di video-conferenza open source BigBlueButton. Puoi creare Stanze per ospitare i meeting, o partecipare ad altri meeting utilizzando collegamenti brevi."
|
||||
welcome: Benvenuti su BigBlueButton.
|
||||
video: Guarda il tutorial sull'utilizzo di GreenLight
|
||||
upgrade: Mostrami come aggiornare alla versione 2.0!
|
||||
version: "E' stata rilasciata una nuova versione di GreenLight, ma il tuo database non è compatibile."
|
||||
language_name: Inglese
|
||||
language_default: Predefinito (linguaggio del browser)
|
||||
ldap_error: Impossibile collegarsi al server LDAP. Controlla la configurazione LDAP nel file env e assicurati che il server sia attivo.
|
||||
login: Entra
|
||||
login_title: Entra nel tuo account
|
||||
mailer:
|
||||
user:
|
||||
password_reset:
|
||||
title: 'Reimposta password'
|
||||
welcome: "Sembra che tu abbia dimenticato la password per %{bigbluebutton}"
|
||||
message: 'Se è così, clicca sul link seguente per reimpostare la tua password:'
|
||||
reset_link: Reimposta Password
|
||||
expire: Questo link scadrà tra 2 ore.
|
||||
ignore: Se non hai richiesto tu di reimpostare la password puoi ignorare questa email.
|
||||
verify_email:
|
||||
welcome: "Benvenuti nel vostro spazio personale, %{name}!"
|
||||
success: "Supporta %{bigbluebutton}, puoi creare le tue stanze e ospitare meeting per collaborare con altri utenti."
|
||||
username: "Il tuo nome utente è %{email}."
|
||||
verify: "Per verificare il tuo account, clicca sul link seguente."
|
||||
verify_text: 'Per verificare il tuo account, visita questo indirizzo: %{url}'
|
||||
verify_link: Verifica Account
|
||||
thanks: "Grazie per aver participato, buona giornata!"
|
||||
max_concurrent: E' stato raggiunto il massimo numero di sessioni contemporanee!
|
||||
modal:
|
||||
create_room:
|
||||
auto_join: Aggiungimi automaticamente alla stanza
|
||||
create: Crea Stanza
|
||||
free_delete: Puoi eliminare la stanza in qualsiasi momento.
|
||||
name_placeholder: Inserisci il nome della stanza...
|
||||
not_blank: Il nome della stanza non può essere vuoto
|
||||
title: Crea una nuova stanza
|
||||
delete_account:
|
||||
confirm: "Sicuro di voler eliminare questo account?"
|
||||
delete: Sono sicuro. Elimina questo account.
|
||||
keep: "mmmh no dai, NON eliminarlo."
|
||||
warning: Questa è la tua ultima possibilità. <b>Non</b> sarai in grado di recuperare i dati associati.
|
||||
delete_room:
|
||||
confirm: "Sicuro di voler eliminare %{room}?"
|
||||
delete: "Sono sicuro, elimina la stanza."
|
||||
keep: "Ripensandoci, penso che la terrò."
|
||||
warning: "<b>Non</b> potrai recuperare questa stanza e le relative %{recordings_num} registrazioni salvate."
|
||||
login:
|
||||
or: o
|
||||
with: "Entra con %{provider}"
|
||||
forgot_password: "Hai dimenticato la password?"
|
||||
rename_recording:
|
||||
room_settings:
|
||||
title: Impostazioni della stanza
|
||||
update: Aggiorna Stanza
|
||||
client: Seleziona il tipo di interfaccia
|
||||
mute: Silenzia utenti quando entrano nella stanza
|
||||
default: Predefinito
|
||||
html: HTML5
|
||||
flash: Flash
|
||||
footer_text: Le impostazioni della stanza possono essere cambiate in qualsiasi momento.
|
||||
rename_room:
|
||||
name_placeholder: Inserisci il nome della nuova stanza...
|
||||
name_update_success: Il nome della stanza è stato cambiato con successo!
|
||||
no_user_email_exists: Non esistono utenti con la email specificata. Controlla di averla inserita correttamente.
|
||||
omniauth_error: Si è verificato un errore con l'autenticazione omniauth. Prova ancora o contatta un amministratore!
|
||||
pagy:
|
||||
nav:
|
||||
prev: "‹ Precedente"
|
||||
next: "Prossimo ›"
|
||||
gap: "…"
|
||||
password: Password
|
||||
password_empty_notice: La password non può essere vuota.
|
||||
password_reset_success: La password è stata reimpostata.
|
||||
password_different_notice: La conferma della password non coincide.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
recaptcha_unreachable: "Accidenti, la verifica reCAPTCHA è fallita. Riprova."
|
||||
verification_failed: "Accidenti, la verifica reCAPTCHA è fallita. Riprova."
|
||||
recording:
|
||||
all_recordings: Tutte le registrazioni
|
||||
email: Registrazioni Email
|
||||
no_recordings: "Questa stanza non ha %{inject} registrazioni."
|
||||
no_user_recordings: Non ci sono registrazioni al momento.
|
||||
no_matched_recordings: Nessuna registrazione corrisponde alla tua ricerca.
|
||||
recorded_on: "Registrato il %{date}"
|
||||
table:
|
||||
name: Nome
|
||||
thumbnails: Anteprima
|
||||
length: Durata
|
||||
users: Utenti
|
||||
visibility: Visibilità
|
||||
formats: Formati
|
||||
visibility:
|
||||
public: Pubblica
|
||||
unlisted: Non in elenco
|
||||
format:
|
||||
presentation: Presentazione
|
||||
rename: Rinomina
|
||||
reset_password:
|
||||
subtitle: Reimposta password
|
||||
password: Nuova password
|
||||
confirm: Conferma nuova password
|
||||
update: Aggiorna password
|
||||
roles:
|
||||
administrator: Amministratore
|
||||
banned: Bloccato
|
||||
super_admin: Super Amministratore
|
||||
user: Utente
|
||||
room:
|
||||
create_room: Crea una stanza
|
||||
create_room_error: Si è verificato un errore nella creazione della stanza
|
||||
create_room_success: La stanza è stata creata correttamente
|
||||
invited: Hai ricevuto un invito per partecipare
|
||||
invite_participants: Invita partecipanti
|
||||
join: Partecipa
|
||||
last_session: "Ultima sessione: %{session}"
|
||||
owner: Proprietario
|
||||
no_sessions: Questa stanza non ha ancora una sessione attiva!
|
||||
recordings: Registrazioni della stanza
|
||||
sessions: Sessioni
|
||||
settings: Impostazioni Stanza
|
||||
start: Avvia
|
||||
unavailable: La stanza non è disponibile finché il proprietario non verifica il suo indirizzo email.
|
||||
update_settings_error: Si è verificato un errore nell'aggiornamento dei dettagli della stanza
|
||||
update_settings_success: Impostazioni della stanza aggiornate correttamente
|
||||
wait:
|
||||
message: Il meeting non è ancora cominciato.
|
||||
auto: Verrai inserito nella stanza non appena il meeting avrà inizio.
|
||||
settings:
|
||||
account:
|
||||
fullname: Nome completo
|
||||
language: Lingua
|
||||
provider: Fornitore
|
||||
image: Immagine
|
||||
image_url: Indirizzo immagine del profilo
|
||||
subtitle: Aggiorna le informazioni del tuo account
|
||||
title: Informazioni account
|
||||
delete:
|
||||
button: "Si, voglio eliminare il mio account."
|
||||
disclaimer: "Se scegli di eliminare il tuo account, <b>NON</b> sarà possibile recuperarlo. Tutte le informazioni riguardo l'account, incluse impostazioni, stanze e registrazioni, verranno eliminate."
|
||||
subtitle: Elimina definitivamente l'account
|
||||
title: Elimina account
|
||||
password:
|
||||
confirmation: Conferma nuova Password
|
||||
new: Nuova Password
|
||||
old: Vecchia Password
|
||||
subtitle: Cambia la password
|
||||
title: Password
|
||||
title: Profilo
|
||||
search: Cerca
|
||||
signup:
|
||||
password_confirm: Conferma Password
|
||||
subtitle: Crea un Account
|
||||
title: Iscriviti
|
||||
with: "Iscriviti con %{provider}"
|
||||
terms:
|
||||
accept: "Accetto %{href}"
|
||||
accept_existing: Accetto i termini e le condizioni
|
||||
title: Termini e Condizioni
|
||||
test_install: >
|
||||
Questa versione usa un server di test pre-configurato, dovresti rimpiazzarlo con il tuo. Per i dettagli, visita %{href}.
|
||||
update: Aggiorna
|
||||
verify:
|
||||
accept: Verifica
|
||||
activated: Account verificato!
|
||||
already_verified: L'Account è già stato verificato
|
||||
invalid: Link di verifica non valido
|
||||
not_verified: Il tuo account non è ancora stato verificato.
|
||||
resend: Rimanda email di verifica
|
||||
signin: Effettua l'accesso al tuo account.
|
||||
title: Verifica la tua email
|
||||
verification: Verifica
|
|
@ -93,7 +93,6 @@ pt:
|
|||
video: Assista ao nosso tutorial sobre como utilizar o Greenlight
|
||||
upgrade: Mostre-me como atualizar para o 2.0!
|
||||
version: "Lançamos uma nova versão do Greenlight, entretanto sua base de dados é incompatível."
|
||||
language_name: Português
|
||||
language_default: Padrão (idioma do navegador)
|
||||
ldap_error: Não é possível conectar-se ao servidor LDAP. Verifique sua configuração LDAP no arquivo ENV e certifique-se de que seu servidor está funcionando.
|
||||
login: Login
|
||||
|
@ -156,7 +155,7 @@ pt:
|
|||
password_different_notice: A Confirmação de Senha não corresponde a Senha inserida acima.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recording:
|
||||
email: Enviar Gravação por E-mail
|
||||
|
|
|
@ -93,7 +93,6 @@ pt_BR:
|
|||
video: Assista ao nosso tutorial sobre como utilizar o Greenlight
|
||||
upgrade: Mostre-me como atualizar para o 2.0!
|
||||
version: "Lançamos uma nova versão do Greenlight, entretanto sua base de dados é incompatível."
|
||||
language_name: Português (Brasil)
|
||||
language_default: Padrão (idioma do navegador)
|
||||
ldap_error: Não é possível conectar ao servidor LDAP. Verifique sua configuração LDAP e certifique-se de que seu servidor está funcionando.
|
||||
login: Entrar
|
||||
|
@ -156,7 +155,7 @@ pt_BR:
|
|||
password_different_notice: A confirmação de senha não confere.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recording:
|
||||
email: Enviar link da gravação por e-mail
|
||||
|
|
|
@ -85,7 +85,6 @@ ru_RU:
|
|||
video: Посмотрите наше руководство по использованию Greenlight
|
||||
upgrade: Показать мне как обновиться до версии 2.0!
|
||||
version: "Мы выпустили новую версию Greenlight, но Ваша база данных несовместима с ней."
|
||||
language_name: Русский
|
||||
language_default: По умолчанию (язык браузера)
|
||||
ldap_error: Невозможно соединиться с сервером LDAP. Пожалуйста проверьте Вашу конфигурацию LDAP в env-файле и убедитесь в работоспособности Вашего LDAP-сервера.
|
||||
login: Войти
|
||||
|
@ -132,7 +131,7 @@ ru_RU:
|
|||
password_different_notice: Подтверждение пароля не совпадает.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recording:
|
||||
email: Отправить ссылку на запись
|
||||
|
|
|
@ -149,7 +149,6 @@ vi_VN:
|
|||
video: Xem thêm hướng dẫn sử dụng LiveRoom
|
||||
upgrade: Hãy chỉ cho tôi cách nâng cấp lên 2.0!
|
||||
version: "Chúng tôi đã phát hành phiên bản mới của Greenlight, nhưng cơ sở dữ liệu của bạn không tương thích."
|
||||
language_name: Tiếng Anh
|
||||
language_default: Mặc định (ngôn ngữ từ trình duyệt)
|
||||
ldap_error: Không thể kết nối với máy chủ LDAP. Vui lòng kiểm tra cấu hình LDAP của bạn trong tệp env và đảm bảo máy chủ của bạn đang hoạt động.
|
||||
login: Đăng nhập
|
||||
|
@ -220,7 +219,7 @@ vi_VN:
|
|||
password_different_notice: Xác nhận mật khẩu không khớp.
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
|
|
@ -175,7 +175,6 @@ zh_CN:
|
|||
video: 请看使用说明
|
||||
upgrade: 告诉我怎么升级到 2.0!
|
||||
version: 我们发布了新版Greenlight,但你的数据库不兼容。
|
||||
language_name: 简体中文
|
||||
language_default: 默认(浏览器语言)
|
||||
ldap_error: 无法连接到LDAP服务器,请在env文件中检查LDAP配置,还要确保服务已经启动。
|
||||
login: 登录
|
||||
|
@ -190,7 +189,7 @@ zh_CN:
|
|||
info: 一个新用户已注册使用Greenlight。
|
||||
more-info: 若要允许此用户访问greenlight,您必须在“组织设置”中批准其帐户。
|
||||
admins_link: 访问组织页面
|
||||
subject: 新Greenlight用户注册
|
||||
subject: 新Greenlight用户注册
|
||||
username: "用户注册了名称 %{name} 和电子邮箱 %{email}."
|
||||
subject: 帐户已批准
|
||||
username: "您的用户名是 %{email}."
|
||||
|
@ -206,7 +205,7 @@ zh_CN:
|
|||
signup:
|
||||
info: 被邀请的用户已注册使用greenlight。
|
||||
admins_link: 访问组织页面
|
||||
subject: 新Greenlight用户注册
|
||||
subject: 新Greenlight用户注册
|
||||
username: "用户注册了名称%{name} 和电子邮箱 %{email}."
|
||||
subject: 邀请加入 BigBlueButton
|
||||
username: "您的用户名是 %{email}."
|
||||
|
@ -284,7 +283,7 @@ zh_CN:
|
|||
password_different_notice: 两次新密码不一致。
|
||||
provider:
|
||||
google: Google
|
||||
microsoft_office365: Office 365
|
||||
office365: Office 365
|
||||
twitter: Twitter
|
||||
recaptcha:
|
||||
errors:
|
||||
|
@ -310,11 +309,11 @@ zh_CN:
|
|||
format:
|
||||
presentation: 演示
|
||||
registration:
|
||||
approval:
|
||||
approval:
|
||||
fail: 您的帐户尚未批准。如果您注册后已过多天,请与管理员联系。
|
||||
signup: 您的帐户已成功创建。它已发送给管理员审批。
|
||||
banned:
|
||||
fail: 您没有访问此应用程序的权限。如果您认为这是一个错误,请联系您的管理员。
|
||||
fail: 您没有访问此应用程序的权限。如果您认为这是一个错误,请联系您的管理员。
|
||||
invite:
|
||||
fail: 您的令牌无效或已过期。如果您认为这是一个错误,请联系您的管理员。
|
||||
no_invite: 您没有被邀请加入。请联系管理员申请邀请。
|
||||
|
|
|
@ -22,13 +22,13 @@ Rails.application.routes.draw do
|
|||
# Error routes.
|
||||
match '/401', to: 'errors#unauthorized', via: :all, as: :unauthorized
|
||||
match '/404', to: 'errors#not_found', via: :all, as: :not_found
|
||||
match '/422', to: 'errors#unprocessable', via: :all
|
||||
match '/500', to: 'errors#internal_error', via: :all, as: :internal_error
|
||||
|
||||
# Signin/Signup routes.
|
||||
get '/signin', to: 'users#signin', as: :signin
|
||||
get '/signup', to: 'users#new', as: :signup
|
||||
post '/signup', to: 'users#create', as: :create_user
|
||||
get '/ldap_signin', to: 'users#ldap_signin', as: :ldap_signin
|
||||
|
||||
# Redirect to terms page
|
||||
match '/terms', to: 'users#terms', via: [:get, :post]
|
||||
|
@ -51,6 +51,7 @@ Rails.application.routes.draw do
|
|||
post '/invite', to: 'admins#invite', as: :invite_user
|
||||
post '/registration_method/:method', to: 'admins#registration_method', as: :admin_change_registration
|
||||
post '/approve/:user_uid', to: 'admins#approve', as: :admin_approve
|
||||
post '/room_limit', to: 'admins#room_limit', as: :admin_room_limit
|
||||
end
|
||||
|
||||
scope '/themes' do
|
||||
|
@ -87,6 +88,7 @@ Rails.application.routes.draw do
|
|||
# Handles Omniauth authentication.
|
||||
match '/auth/:provider/callback', to: 'sessions#omniauth', via: [:get, :post], as: :omniauth_session
|
||||
get '/auth/failure', to: 'sessions#omniauth_fail'
|
||||
post '/auth/ldap', to: 'sessions#ldap', as: :ldap_callback
|
||||
|
||||
# Room resources.
|
||||
resources :rooms, only: [:create, :show, :destroy], param: :room_uid, path: '/'
|
||||
|
|
|
@ -47,6 +47,7 @@ TWITTER_SECRET=
|
|||
#
|
||||
OFFICE365_KEY=
|
||||
OFFICE365_SECRET=
|
||||
OFFICE365_HD=
|
||||
|
||||
# LDAP Login Provider (optional)
|
||||
#
|
||||
|
|
|
@ -247,7 +247,9 @@ describe AdminsController, type: :controller do
|
|||
expect(response).to redirect_to(admins_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "Site Settings" do
|
||||
context "POST #registration_method" do
|
||||
it "changes the registration method for the given context" do
|
||||
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
|
||||
|
@ -294,5 +296,21 @@ describe AdminsController, type: :controller do
|
|||
expect(response).to redirect_to(admins_path)
|
||||
end
|
||||
end
|
||||
|
||||
context "POST #room_limit" do
|
||||
it "changes the room limit setting" do
|
||||
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
|
||||
allow_any_instance_of(User).to receive(:greenlight_account?).and_return(true)
|
||||
|
||||
@request.session[:user_id] = @admin.id
|
||||
|
||||
post :room_limit, params: { limit: 5 }
|
||||
|
||||
feature = Setting.find_by(provider: "provider1").features.find_by(name: "Room Limit")
|
||||
|
||||
expect(feature[:value]).to eq("5")
|
||||
expect(response).to redirect_to(admins_path)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -31,6 +31,10 @@ describe ApplicationController do
|
|||
def error
|
||||
raise BigBlueButton::BigBlueButtonException
|
||||
end
|
||||
|
||||
def user_not_found
|
||||
set_user_domain
|
||||
end
|
||||
end
|
||||
|
||||
context "roles" do
|
||||
|
@ -66,5 +70,41 @@ describe ApplicationController do
|
|||
get :error
|
||||
expect(response).to render_template("errors/bigbluebutton_error")
|
||||
end
|
||||
|
||||
it "renders a 404 error if user is not found" do
|
||||
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
|
||||
allow(Rails.env).to receive(:test?).and_return(false)
|
||||
allow_any_instance_of(SessionsHelper).to receive(:parse_user_domain).and_return("fake_provider")
|
||||
allow_any_instance_of(BbbApi).to receive(:retrieve_provider_info).and_raise("No user with that id exists")
|
||||
|
||||
routes.draw { get "user_not_found" => "anonymous#user_not_found" }
|
||||
|
||||
get :user_not_found
|
||||
expect(response).to render_template("errors/not_found")
|
||||
end
|
||||
|
||||
it "renders a 404 error if user is not given" do
|
||||
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
|
||||
allow(Rails.env).to receive(:test?).and_return(false)
|
||||
allow_any_instance_of(SessionsHelper).to receive(:parse_user_domain).and_return("")
|
||||
allow_any_instance_of(BbbApi).to receive(:retrieve_provider_info).and_raise("Provider not included.")
|
||||
|
||||
routes.draw { get "user_not_found" => "anonymous#user_not_found" }
|
||||
|
||||
get :user_not_found
|
||||
expect(response).to render_template("errors/not_found")
|
||||
end
|
||||
|
||||
it "renders a 500 error if any other error related to bbb api" do
|
||||
allow(Rails.configuration).to receive(:loadbalanced_configuration).and_return(true)
|
||||
allow(Rails.env).to receive(:test?).and_return(false)
|
||||
allow_any_instance_of(SessionsHelper).to receive(:parse_user_domain).and_return("")
|
||||
allow_any_instance_of(BbbApi).to receive(:retrieve_provider_info).and_raise("Other error")
|
||||
|
||||
routes.draw { get "user_not_found" => "anonymous#user_not_found" }
|
||||
|
||||
get :user_not_found
|
||||
expect(response).to render_template("errors/internal_error")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -26,13 +26,6 @@ describe ErrorsController, type: :controller do
|
|||
end
|
||||
end
|
||||
|
||||
describe "GET #unprocessable" do
|
||||
it "returns unprocessable" do
|
||||
get :unprocessable
|
||||
expect(response).to have_http_status(422)
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET #internal_error" do
|
||||
it "returns internal_error" do
|
||||
get :internal_error
|
||||
|
|
|
@ -129,7 +129,7 @@ describe RoomsController, type: :controller do
|
|||
expect(response).to redirect_to(r)
|
||||
end
|
||||
|
||||
it "it should redirect to root if not logged in" do
|
||||
it "should redirect to root if not logged in" do
|
||||
expect do
|
||||
name = Faker::Games::Pokemon.name
|
||||
post :create, params: { room: { name: name } }
|
||||
|
@ -138,7 +138,7 @@ describe RoomsController, type: :controller do
|
|||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
|
||||
it "it should redirect back to main room with error if it fails" do
|
||||
it "should redirect back to main room with error if it fails" do
|
||||
@request.session[:user_id] = @owner.id
|
||||
|
||||
room_params = { name: "", "client": "html5", "mute_on_join": "1" }
|
||||
|
@ -148,6 +148,19 @@ describe RoomsController, type: :controller do
|
|||
expect(flash[:alert]).to be_present
|
||||
expect(response).to redirect_to(@owner.main_room)
|
||||
end
|
||||
|
||||
it "redirects to main room if room limit is reached" do
|
||||
allow_any_instance_of(Setting).to receive(:get_value).and_return(1)
|
||||
|
||||
@request.session[:user_id] = @owner.id
|
||||
|
||||
room_params = { name: Faker::Games::Pokemon.name, "client": "html5", "mute_on_join": "1" }
|
||||
|
||||
post :create, params: { room: room_params }
|
||||
|
||||
expect(flash[:alert]).to be_present
|
||||
expect(response).to redirect_to(@owner.main_room)
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST #join" do
|
||||
|
|
|
@ -156,6 +156,29 @@ describe SessionsController, type: :controller do
|
|||
expect(@request.session[:user_id]).to eql(user.id)
|
||||
expect(response).to redirect_to(admins_path)
|
||||
end
|
||||
|
||||
it "should migrate old rooms from the twitter account to the new user" do
|
||||
twitter_user = User.create(name: "Twitter User", email: "user@twitter.com", image: "example.png",
|
||||
username: "twitteruser", email_verified: true, provider: 'twitter', social_uid: "twitter-user")
|
||||
|
||||
room = Room.new(name: "Test")
|
||||
room.owner = twitter_user
|
||||
room.save!
|
||||
|
||||
post :create, params: {
|
||||
session: {
|
||||
email: @user1.email,
|
||||
password: 'example',
|
||||
},
|
||||
}, session: {
|
||||
old_twitter_user_id: twitter_user.id
|
||||
}
|
||||
|
||||
@user1.reload
|
||||
expect(@user1.rooms.count).to eq(3)
|
||||
expect(@user1.rooms.find { |r| r.name == "Old Home Room" }).to_not be_nil
|
||||
expect(@user1.rooms.find { |r| r.name == "Test" }).to_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET/POST #omniauth" do
|
||||
|
@ -173,6 +196,18 @@ describe SessionsController, type: :controller do
|
|||
},
|
||||
)
|
||||
|
||||
OmniAuth.config.mock_auth[:google] = OmniAuth::AuthHash.new(
|
||||
provider: "google",
|
||||
uid: "google-user",
|
||||
info: {
|
||||
email: "user@google.com",
|
||||
name: "Google User",
|
||||
nickname: "googleuser",
|
||||
image: "touch.png",
|
||||
customer: 'customer1',
|
||||
}
|
||||
)
|
||||
|
||||
OmniAuth.config.mock_auth[:bn_launcher] = OmniAuth::AuthHash.new(
|
||||
provider: "bn_launcher",
|
||||
uid: "bn-launcher-user",
|
||||
|
@ -190,68 +225,108 @@ describe SessionsController, type: :controller do
|
|||
}
|
||||
end
|
||||
|
||||
unless Rails.configuration.omniauth_bn_launcher
|
||||
it "should create and login user with omniauth twitter" do
|
||||
it "should create and login user with omniauth google" do
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:google]
|
||||
get :omniauth, params: { provider: :google }
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("google")
|
||||
expect(u.email).to eql("user@google.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
end
|
||||
|
||||
it "should create and login user with omniauth bn launcher" do
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
get :omniauth, params: { provider: 'bn_launcher' }
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("customer1")
|
||||
expect(u.email).to eql("user@google.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
end
|
||||
|
||||
it "should redirect to root on invalid omniauth login" do
|
||||
request.env["omniauth.auth"] = :invalid_credentials
|
||||
get :omniauth, params: { provider: :google }
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
|
||||
it "should not create session without omniauth env set for google" do
|
||||
get :omniauth, params: { provider: 'google' }
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
|
||||
context 'twitter deprecation' do
|
||||
it "should not allow new user sign up with omniauth twitter" do
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:twitter]
|
||||
get :omniauth, params: { provider: :twitter }
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("twitter")
|
||||
expect(u.email).to eql("user@twitter.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
expect(response).to redirect_to(root_path)
|
||||
expect(flash[:alert]).to eq(I18n.t("registration.deprecated.twitter_signup"))
|
||||
end
|
||||
|
||||
it "should create and login user with omniauth bn launcher" do
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
get :omniauth, params: { provider: 'bn_launcher' }
|
||||
it "should notify twitter users that twitter is deprecated" do
|
||||
allow(Rails.configuration).to receive(:allow_user_signup).and_return(true)
|
||||
twitter_user = User.create(name: "Twitter User", email: "user@twitter.com", image: "example.png",
|
||||
username: "twitteruser", email_verified: true, provider: 'twitter', social_uid: "twitter-user")
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("customer1")
|
||||
expect(u.email).to eql("user@google.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
end
|
||||
|
||||
it "should redirect to root on invalid omniauth login" do
|
||||
request.env["omniauth.auth"] = :invalid_credentials
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:twitter]
|
||||
get :omniauth, params: { provider: :twitter }
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
expect(flash[:alert]).to eq(I18n.t("registration.deprecated.twitter_signin",
|
||||
link: signup_path(old_twitter_user_id: twitter_user.id)))
|
||||
end
|
||||
|
||||
it "should not create session without omniauth env set for google" do
|
||||
get :omniauth, params: { provider: 'google' }
|
||||
it "should migrate rooms from the twitter account to the google account" do
|
||||
twitter_user = User.create(name: "Twitter User", email: "user@twitter.com", image: "example.png",
|
||||
username: "twitteruser", email_verified: true, provider: 'twitter', social_uid: "twitter-user")
|
||||
|
||||
expect(response).to redirect_to(root_path)
|
||||
room = Room.new(name: "Test")
|
||||
room.owner = twitter_user
|
||||
room.save!
|
||||
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:google]
|
||||
get :omniauth, params: { provider: :google }, session: { old_twitter_user_id: twitter_user.id }
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("google")
|
||||
expect(u.email).to eql("user@google.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
expect(u.rooms.count).to eq(3)
|
||||
expect(u.rooms.find { |r| r.name == "Old Home Room" }).to_not be_nil
|
||||
expect(u.rooms.find { |r| r.name == "Test" }).to_not be_nil
|
||||
end
|
||||
end
|
||||
|
||||
context 'registration notification emails' do
|
||||
before do
|
||||
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
|
||||
@user = create(:user, provider: "greenlight")
|
||||
@admin = create(:user, provider: "greenlight", email: "test@example.com")
|
||||
@admin.add_role :admin
|
||||
end
|
||||
|
||||
context 'registration notification emails' do
|
||||
before do
|
||||
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
|
||||
@user = create(:user, provider: "greenlight")
|
||||
@admin = create(:user, provider: "greenlight", email: "test@example.com")
|
||||
@admin.add_role :admin
|
||||
end
|
||||
it "should notify admin on new user signup with approve/reject registration" do
|
||||
allow_any_instance_of(Registrar).to receive(:approval_registration).and_return(true)
|
||||
|
||||
it "should notify admin on new user signup with approve/reject registration" do
|
||||
allow_any_instance_of(Registrar).to receive(:approval_registration).and_return(true)
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
expect { get :omniauth, params: { provider: 'bn_launcher' } }
|
||||
.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||
end
|
||||
|
||||
expect { get :omniauth, params: { provider: 'bn_launcher' } }
|
||||
.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||
end
|
||||
it "should notify admin on new user signup with invite registration" do
|
||||
allow_any_instance_of(Registrar).to receive(:invite_registration).and_return(true)
|
||||
|
||||
it "should notify admin on new user signup with invite registration" do
|
||||
allow_any_instance_of(Registrar).to receive(:invite_registration).and_return(true)
|
||||
invite = Invitation.create(email: "user@google.com", provider: "greenlight")
|
||||
@request.session[:invite_token] = invite.invite_token
|
||||
|
||||
invite = Invitation.create(email: "user@google.com", provider: "greenlight")
|
||||
@request.session[:invite_token] = invite.invite_token
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
|
||||
request.env["omniauth.auth"] = OmniAuth.config.mock_auth[:bn_launcher]
|
||||
|
||||
expect { get :omniauth, params: { provider: 'bn_launcher' } }
|
||||
.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||
end
|
||||
expect { get :omniauth, params: { provider: 'bn_launcher' } }
|
||||
.to change { ActionMailer::Base.deliveries.count }.by(1)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -261,4 +336,41 @@ describe SessionsController, type: :controller do
|
|||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
end
|
||||
|
||||
describe "POST #ldap" do
|
||||
it "should create and login a user with a ldap login" do
|
||||
entry = Net::LDAP::Entry.new("cn=Test User,ou=people,dc=planetexpress,dc=com")
|
||||
entry[:cn] = "Test User"
|
||||
entry[:givenName] = "Test"
|
||||
entry[:sn] = "User"
|
||||
entry[:mail] = "test@example.com"
|
||||
allow_any_instance_of(Net::LDAP).to receive(:bind_as).and_return([entry])
|
||||
|
||||
post :ldap, params: {
|
||||
session: {
|
||||
user: "test",
|
||||
password: 'password',
|
||||
},
|
||||
}
|
||||
|
||||
u = User.last
|
||||
expect(u.provider).to eql("ldap")
|
||||
expect(u.email).to eql("test@example.com")
|
||||
expect(@request.session[:user_id]).to eql(u.id)
|
||||
end
|
||||
|
||||
it "should redirect to signin on invalid credentials" do
|
||||
allow_any_instance_of(Net::LDAP).to receive(:bind_as).and_return(false)
|
||||
|
||||
post :ldap, params: {
|
||||
session: {
|
||||
user: "test",
|
||||
password: 'passwor',
|
||||
},
|
||||
}
|
||||
|
||||
expect(response).to redirect_to(ldap_signin_path)
|
||||
expect(flash[:alert]).to eq(I18n.t("invalid_credentials"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -387,4 +387,12 @@ describe UsersController, type: :controller do
|
|||
expect(response).to redirect_to(root_path)
|
||||
end
|
||||
end
|
||||
|
||||
context 'GET #ldap_signin' do
|
||||
it "should render the ldap signin page" do
|
||||
get :ldap_signin
|
||||
|
||||
expect(response).to render_template(:ldap_signin)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Before Width: | Height: | Size: 49 B |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 532 B |
Before Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1012 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 86 B |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 78 B |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 562 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 970 B |
Before Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 86 B |
Before Width: | Height: | Size: 1008 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1018 B |
Before Width: | Height: | Size: 997 B |
Before Width: | Height: | Size: 506 B |
Before Width: | Height: | Size: 518 B |
Before Width: | Height: | Size: 315 B |
|
@ -1,484 +0,0 @@
|
|||
/**
|
||||
*
|
||||
* Color picker
|
||||
* Author: Stefan Petre www.eyecon.ro
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses
|
||||
*
|
||||
*/
|
||||
(function ($) {
|
||||
var ColorPicker = function () {
|
||||
var
|
||||
ids = {},
|
||||
inAction,
|
||||
charMin = 65,
|
||||
visible,
|
||||
tpl = '<div class="colorpicker"><div class="colorpicker_color"><div><div></div></div></div><div class="colorpicker_hue"><div></div></div><div class="colorpicker_new_color"></div><div class="colorpicker_current_color"></div><div class="colorpicker_hex"><input type="text" maxlength="6" size="6" /></div><div class="colorpicker_rgb_r colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_g colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_rgb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_h colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_s colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_hsb_b colorpicker_field"><input type="text" maxlength="3" size="3" /><span></span></div><div class="colorpicker_submit"></div></div>',
|
||||
defaults = {
|
||||
eventName: 'click',
|
||||
onShow: function () {},
|
||||
onBeforeShow: function(){},
|
||||
onHide: function () {},
|
||||
onChange: function () {},
|
||||
onSubmit: function () {},
|
||||
color: 'ff0000',
|
||||
livePreview: true,
|
||||
flat: false
|
||||
},
|
||||
fillRGBFields = function (hsb, cal) {
|
||||
var rgb = HSBToRGB(hsb);
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(1).val(rgb.r).end()
|
||||
.eq(2).val(rgb.g).end()
|
||||
.eq(3).val(rgb.b).end();
|
||||
},
|
||||
fillHSBFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(4).val(hsb.h).end()
|
||||
.eq(5).val(hsb.s).end()
|
||||
.eq(6).val(hsb.b).end();
|
||||
},
|
||||
fillHexFields = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').fields
|
||||
.eq(0).val(HSBToHex(hsb)).end();
|
||||
},
|
||||
setSelector = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').selector.css('backgroundColor', '#' + HSBToHex({h: hsb.h, s: 100, b: 100}));
|
||||
$(cal).data('colorpicker').selectorIndic.css({
|
||||
left: parseInt(150 * hsb.s/100, 10),
|
||||
top: parseInt(150 * (100-hsb.b)/100, 10)
|
||||
});
|
||||
},
|
||||
setHue = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').hue.css('top', parseInt(150 - 150 * hsb.h/360, 10));
|
||||
},
|
||||
setCurrentColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').currentColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
setNewColor = function (hsb, cal) {
|
||||
$(cal).data('colorpicker').newColor.css('backgroundColor', '#' + HSBToHex(hsb));
|
||||
},
|
||||
keyDown = function (ev) {
|
||||
var pressedKey = ev.charCode || ev.keyCode || -1;
|
||||
if ((pressedKey > charMin && pressedKey <= 90) || pressedKey == 32) {
|
||||
return false;
|
||||
}
|
||||
var cal = $(this).parent().parent();
|
||||
if (cal.data('colorpicker').livePreview === true) {
|
||||
change.apply(this);
|
||||
}
|
||||
},
|
||||
change = function (ev) {
|
||||
var cal = $(this).parent().parent(), col;
|
||||
if (this.parentNode.className.indexOf('_hex') > 0) {
|
||||
cal.data('colorpicker').color = col = HexToHSB(fixHex(this.value));
|
||||
} else if (this.parentNode.className.indexOf('_hsb') > 0) {
|
||||
cal.data('colorpicker').color = col = fixHSB({
|
||||
h: parseInt(cal.data('colorpicker').fields.eq(4).val(), 10),
|
||||
s: parseInt(cal.data('colorpicker').fields.eq(5).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(6).val(), 10)
|
||||
});
|
||||
} else {
|
||||
cal.data('colorpicker').color = col = RGBToHSB(fixRGB({
|
||||
r: parseInt(cal.data('colorpicker').fields.eq(1).val(), 10),
|
||||
g: parseInt(cal.data('colorpicker').fields.eq(2).val(), 10),
|
||||
b: parseInt(cal.data('colorpicker').fields.eq(3).val(), 10)
|
||||
}));
|
||||
}
|
||||
if (ev) {
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
}
|
||||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onChange.apply(cal, [col, HSBToHex(col), HSBToRGB(col)]);
|
||||
},
|
||||
blur = function (ev) {
|
||||
var cal = $(this).parent().parent();
|
||||
cal.data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
||||
},
|
||||
focus = function () {
|
||||
charMin = this.parentNode.className.indexOf('_hex') > 0 ? 70 : 65;
|
||||
$(this).parent().parent().data('colorpicker').fields.parent().removeClass('colorpicker_focus');
|
||||
$(this).parent().addClass('colorpicker_focus');
|
||||
},
|
||||
downIncrement = function (ev) {
|
||||
var field = $(this).parent().find('input').focus();
|
||||
var current = {
|
||||
el: $(this).parent().addClass('colorpicker_slider'),
|
||||
max: this.parentNode.className.indexOf('_hsb_h') > 0 ? 360 : (this.parentNode.className.indexOf('_hsb') > 0 ? 100 : 255),
|
||||
y: ev.pageY,
|
||||
field: field,
|
||||
val: parseInt(field.val(), 10),
|
||||
preview: $(this).parent().parent().data('colorpicker').livePreview
|
||||
};
|
||||
$(document).bind('mouseup', current, upIncrement);
|
||||
$(document).bind('mousemove', current, moveIncrement);
|
||||
},
|
||||
moveIncrement = function (ev) {
|
||||
ev.data.field.val(Math.max(0, Math.min(ev.data.max, parseInt(ev.data.val + ev.pageY - ev.data.y, 10))));
|
||||
if (ev.data.preview) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
}
|
||||
return false;
|
||||
},
|
||||
upIncrement = function (ev) {
|
||||
change.apply(ev.data.field.get(0), [true]);
|
||||
ev.data.el.removeClass('colorpicker_slider').find('input').focus();
|
||||
$(document).unbind('mouseup', upIncrement);
|
||||
$(document).unbind('mousemove', moveIncrement);
|
||||
return false;
|
||||
},
|
||||
downHue = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
y: $(this).offset().top
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upHue);
|
||||
$(document).bind('mousemove', current, moveHue);
|
||||
},
|
||||
moveHue = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(4)
|
||||
.val(parseInt(360*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.y))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upHue = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upHue);
|
||||
$(document).unbind('mousemove', moveHue);
|
||||
return false;
|
||||
},
|
||||
downSelector = function (ev) {
|
||||
var current = {
|
||||
cal: $(this).parent(),
|
||||
pos: $(this).offset()
|
||||
};
|
||||
current.preview = current.cal.data('colorpicker').livePreview;
|
||||
$(document).bind('mouseup', current, upSelector);
|
||||
$(document).bind('mousemove', current, moveSelector);
|
||||
},
|
||||
moveSelector = function (ev) {
|
||||
change.apply(
|
||||
ev.data.cal.data('colorpicker')
|
||||
.fields
|
||||
.eq(6)
|
||||
.val(parseInt(100*(150 - Math.max(0,Math.min(150,(ev.pageY - ev.data.pos.top))))/150, 10))
|
||||
.end()
|
||||
.eq(5)
|
||||
.val(parseInt(100*(Math.max(0,Math.min(150,(ev.pageX - ev.data.pos.left))))/150, 10))
|
||||
.get(0),
|
||||
[ev.data.preview]
|
||||
);
|
||||
return false;
|
||||
},
|
||||
upSelector = function (ev) {
|
||||
fillRGBFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
fillHexFields(ev.data.cal.data('colorpicker').color, ev.data.cal.get(0));
|
||||
$(document).unbind('mouseup', upSelector);
|
||||
$(document).unbind('mousemove', moveSelector);
|
||||
return false;
|
||||
},
|
||||
enterSubmit = function (ev) {
|
||||
$(this).addClass('colorpicker_focus');
|
||||
},
|
||||
leaveSubmit = function (ev) {
|
||||
$(this).removeClass('colorpicker_focus');
|
||||
},
|
||||
clickSubmit = function (ev) {
|
||||
var cal = $(this).parent();
|
||||
var col = cal.data('colorpicker').color;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
setCurrentColor(col, cal.get(0));
|
||||
cal.data('colorpicker').onSubmit(col, HSBToHex(col), HSBToRGB(col), cal.data('colorpicker').el);
|
||||
},
|
||||
show = function (ev) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').onBeforeShow.apply(this, [cal.get(0)]);
|
||||
var pos = $(this).offset();
|
||||
var viewPort = getViewport();
|
||||
var top = pos.top + this.offsetHeight;
|
||||
var left = pos.left;
|
||||
if (top + 176 > viewPort.t + viewPort.h) {
|
||||
top -= this.offsetHeight + 176;
|
||||
}
|
||||
if (left + 356 > viewPort.l + viewPort.w) {
|
||||
left -= 356;
|
||||
}
|
||||
cal.css({left: left + 'px', top: top + 'px'});
|
||||
if (cal.data('colorpicker').onShow.apply(this, [cal.get(0)]) != false) {
|
||||
cal.show();
|
||||
}
|
||||
$(document).bind('mousedown', {cal: cal}, hide);
|
||||
return false;
|
||||
},
|
||||
hide = function (ev) {
|
||||
if (!isChildOf(ev.data.cal.get(0), ev.target, ev.data.cal.get(0))) {
|
||||
if (ev.data.cal.data('colorpicker').onHide.apply(this, [ev.data.cal.get(0)]) != false) {
|
||||
ev.data.cal.hide();
|
||||
}
|
||||
$(document).unbind('mousedown', hide);
|
||||
}
|
||||
},
|
||||
isChildOf = function(parentEl, el, container) {
|
||||
if (parentEl == el) {
|
||||
return true;
|
||||
}
|
||||
if (parentEl.contains) {
|
||||
return parentEl.contains(el);
|
||||
}
|
||||
if ( parentEl.compareDocumentPosition ) {
|
||||
return !!(parentEl.compareDocumentPosition(el) & 16);
|
||||
}
|
||||
var prEl = el.parentNode;
|
||||
while(prEl && prEl != container) {
|
||||
if (prEl == parentEl)
|
||||
return true;
|
||||
prEl = prEl.parentNode;
|
||||
}
|
||||
return false;
|
||||
},
|
||||
getViewport = function () {
|
||||
var m = document.compatMode == 'CSS1Compat';
|
||||
return {
|
||||
l : window.pageXOffset || (m ? document.documentElement.scrollLeft : document.body.scrollLeft),
|
||||
t : window.pageYOffset || (m ? document.documentElement.scrollTop : document.body.scrollTop),
|
||||
w : window.innerWidth || (m ? document.documentElement.clientWidth : document.body.clientWidth),
|
||||
h : window.innerHeight || (m ? document.documentElement.clientHeight : document.body.clientHeight)
|
||||
};
|
||||
},
|
||||
fixHSB = function (hsb) {
|
||||
return {
|
||||
h: Math.min(360, Math.max(0, hsb.h)),
|
||||
s: Math.min(100, Math.max(0, hsb.s)),
|
||||
b: Math.min(100, Math.max(0, hsb.b))
|
||||
};
|
||||
},
|
||||
fixRGB = function (rgb) {
|
||||
return {
|
||||
r: Math.min(255, Math.max(0, rgb.r)),
|
||||
g: Math.min(255, Math.max(0, rgb.g)),
|
||||
b: Math.min(255, Math.max(0, rgb.b))
|
||||
};
|
||||
},
|
||||
fixHex = function (hex) {
|
||||
var len = 6 - hex.length;
|
||||
if (len > 0) {
|
||||
var o = [];
|
||||
for (var i=0; i<len; i++) {
|
||||
o.push('0');
|
||||
}
|
||||
o.push(hex);
|
||||
hex = o.join('');
|
||||
}
|
||||
return hex;
|
||||
},
|
||||
HexToRGB = function (hex) {
|
||||
var hex = parseInt(((hex.indexOf('#') > -1) ? hex.substring(1) : hex), 16);
|
||||
return {r: hex >> 16, g: (hex & 0x00FF00) >> 8, b: (hex & 0x0000FF)};
|
||||
},
|
||||
HexToHSB = function (hex) {
|
||||
return RGBToHSB(HexToRGB(hex));
|
||||
},
|
||||
RGBToHSB = function (rgb) {
|
||||
var hsb = {
|
||||
h: 0,
|
||||
s: 0,
|
||||
b: 0
|
||||
};
|
||||
var min = Math.min(rgb.r, rgb.g, rgb.b);
|
||||
var max = Math.max(rgb.r, rgb.g, rgb.b);
|
||||
var delta = max - min;
|
||||
hsb.b = max;
|
||||
if (max != 0) {
|
||||
|
||||
}
|
||||
hsb.s = max != 0 ? 255 * delta / max : 0;
|
||||
if (hsb.s != 0) {
|
||||
if (rgb.r == max) {
|
||||
hsb.h = (rgb.g - rgb.b) / delta;
|
||||
} else if (rgb.g == max) {
|
||||
hsb.h = 2 + (rgb.b - rgb.r) / delta;
|
||||
} else {
|
||||
hsb.h = 4 + (rgb.r - rgb.g) / delta;
|
||||
}
|
||||
} else {
|
||||
hsb.h = -1;
|
||||
}
|
||||
hsb.h *= 60;
|
||||
if (hsb.h < 0) {
|
||||
hsb.h += 360;
|
||||
}
|
||||
hsb.s *= 100/255;
|
||||
hsb.b *= 100/255;
|
||||
return hsb;
|
||||
},
|
||||
HSBToRGB = function (hsb) {
|
||||
var rgb = {};
|
||||
var h = Math.round(hsb.h);
|
||||
var s = Math.round(hsb.s*255/100);
|
||||
var v = Math.round(hsb.b*255/100);
|
||||
if(s == 0) {
|
||||
rgb.r = rgb.g = rgb.b = v;
|
||||
} else {
|
||||
var t1 = v;
|
||||
var t2 = (255-s)*v/255;
|
||||
var t3 = (t1-t2)*(h%60)/60;
|
||||
if(h==360) h = 0;
|
||||
if(h<60) {rgb.r=t1; rgb.b=t2; rgb.g=t2+t3}
|
||||
else if(h<120) {rgb.g=t1; rgb.b=t2; rgb.r=t1-t3}
|
||||
else if(h<180) {rgb.g=t1; rgb.r=t2; rgb.b=t2+t3}
|
||||
else if(h<240) {rgb.b=t1; rgb.r=t2; rgb.g=t1-t3}
|
||||
else if(h<300) {rgb.b=t1; rgb.g=t2; rgb.r=t2+t3}
|
||||
else if(h<360) {rgb.r=t1; rgb.g=t2; rgb.b=t1-t3}
|
||||
else {rgb.r=0; rgb.g=0; rgb.b=0}
|
||||
}
|
||||
return {r:Math.round(rgb.r), g:Math.round(rgb.g), b:Math.round(rgb.b)};
|
||||
},
|
||||
RGBToHex = function (rgb) {
|
||||
var hex = [
|
||||
rgb.r.toString(16),
|
||||
rgb.g.toString(16),
|
||||
rgb.b.toString(16)
|
||||
];
|
||||
$.each(hex, function (nr, val) {
|
||||
if (val.length == 1) {
|
||||
hex[nr] = '0' + val;
|
||||
}
|
||||
});
|
||||
return hex.join('');
|
||||
},
|
||||
HSBToHex = function (hsb) {
|
||||
return RGBToHex(HSBToRGB(hsb));
|
||||
},
|
||||
restoreOriginal = function () {
|
||||
var cal = $(this).parent();
|
||||
var col = cal.data('colorpicker').origColor;
|
||||
cal.data('colorpicker').color = col;
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
setSelector(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
};
|
||||
return {
|
||||
init: function (opt) {
|
||||
opt = $.extend({}, defaults, opt||{});
|
||||
if (typeof opt.color == 'string') {
|
||||
opt.color = HexToHSB(opt.color);
|
||||
} else if (opt.color.r != undefined && opt.color.g != undefined && opt.color.b != undefined) {
|
||||
opt.color = RGBToHSB(opt.color);
|
||||
} else if (opt.color.h != undefined && opt.color.s != undefined && opt.color.b != undefined) {
|
||||
opt.color = fixHSB(opt.color);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
return this.each(function () {
|
||||
if (!$(this).data('colorpickerId')) {
|
||||
var options = $.extend({}, opt);
|
||||
options.origColor = opt.color;
|
||||
var id = 'collorpicker_' + parseInt(Math.random() * 1000);
|
||||
$(this).data('colorpickerId', id);
|
||||
var cal = $(tpl).attr('id', id);
|
||||
if (options.flat) {
|
||||
cal.appendTo(this).show();
|
||||
} else {
|
||||
cal.appendTo(document.body);
|
||||
}
|
||||
options.fields = cal
|
||||
.find('input')
|
||||
.bind('keyup', keyDown)
|
||||
.bind('change', change)
|
||||
.bind('blur', blur)
|
||||
.bind('focus', focus);
|
||||
cal
|
||||
.find('span').bind('mousedown', downIncrement).end()
|
||||
.find('>div.colorpicker_current_color').bind('click', restoreOriginal);
|
||||
options.selector = cal.find('div.colorpicker_color').bind('mousedown', downSelector);
|
||||
options.selectorIndic = options.selector.find('div div');
|
||||
options.el = this;
|
||||
options.hue = cal.find('div.colorpicker_hue div');
|
||||
cal.find('div.colorpicker_hue').bind('mousedown', downHue);
|
||||
options.newColor = cal.find('div.colorpicker_new_color');
|
||||
options.currentColor = cal.find('div.colorpicker_current_color');
|
||||
cal.data('colorpicker', options);
|
||||
cal.find('div.colorpicker_submit')
|
||||
.bind('mouseenter', enterSubmit)
|
||||
.bind('mouseleave', leaveSubmit)
|
||||
.bind('click', clickSubmit);
|
||||
fillRGBFields(options.color, cal.get(0));
|
||||
fillHSBFields(options.color, cal.get(0));
|
||||
fillHexFields(options.color, cal.get(0));
|
||||
setHue(options.color, cal.get(0));
|
||||
setSelector(options.color, cal.get(0));
|
||||
setCurrentColor(options.color, cal.get(0));
|
||||
setNewColor(options.color, cal.get(0));
|
||||
if (options.flat) {
|
||||
cal.css({
|
||||
position: 'relative',
|
||||
display: 'block'
|
||||
});
|
||||
} else {
|
||||
$(this).bind(options.eventName, show);
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
showPicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
show.apply(this);
|
||||
}
|
||||
});
|
||||
},
|
||||
hidePicker: function() {
|
||||
return this.each( function () {
|
||||
if ($(this).data('colorpickerId')) {
|
||||
$('#' + $(this).data('colorpickerId')).hide();
|
||||
}
|
||||
});
|
||||
},
|
||||
setColor: function(col) {
|
||||
if (typeof col == 'string') {
|
||||
col = HexToHSB(col);
|
||||
} else if (col.r != undefined && col.g != undefined && col.b != undefined) {
|
||||
col = RGBToHSB(col);
|
||||
} else if (col.h != undefined && col.s != undefined && col.b != undefined) {
|
||||
col = fixHSB(col);
|
||||
} else {
|
||||
return this;
|
||||
}
|
||||
return this.each(function(){
|
||||
if ($(this).data('colorpickerId')) {
|
||||
var cal = $('#' + $(this).data('colorpickerId'));
|
||||
cal.data('colorpicker').color = col;
|
||||
cal.data('colorpicker').origColor = col;
|
||||
fillRGBFields(col, cal.get(0));
|
||||
fillHSBFields(col, cal.get(0));
|
||||
fillHexFields(col, cal.get(0));
|
||||
setHue(col, cal.get(0));
|
||||
setSelector(col, cal.get(0));
|
||||
setCurrentColor(col, cal.get(0));
|
||||
setNewColor(col, cal.get(0));
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
}();
|
||||
$.fn.extend({
|
||||
ColorPicker: ColorPicker.init,
|
||||
ColorPickerHide: ColorPicker.hidePicker,
|
||||
ColorPickerShow: ColorPicker.showPicker,
|
||||
ColorPickerSetColor: ColorPicker.setColor
|
||||
});
|
||||
})(jQuery)
|
|
@ -1,161 +0,0 @@
|
|||
.colorpicker {
|
||||
width: 356px;
|
||||
height: 176px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
background: image-url("colourPicker/colorpicker_background.png");
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
display: none;
|
||||
}
|
||||
.colorpicker_color {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
left: 14px;
|
||||
top: 13px;
|
||||
position: absolute;
|
||||
background: #f00;
|
||||
overflow: hidden;
|
||||
cursor: crosshair;
|
||||
}
|
||||
.colorpicker_color div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
background: image-url("colourPicker/colorpicker_overlay.png");
|
||||
}
|
||||
.colorpicker_color div div {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 11px;
|
||||
height: 11px;
|
||||
overflow: hidden;
|
||||
background: image-url("colourPicker/colorpicker_select.gif");
|
||||
margin: -5px 0 0 -5px;
|
||||
}
|
||||
.colorpicker_hue {
|
||||
position: absolute;
|
||||
top: 13px;
|
||||
left: 171px;
|
||||
width: 35px;
|
||||
height: 150px;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_hue div {
|
||||
position: absolute;
|
||||
width: 35px;
|
||||
height: 9px;
|
||||
overflow: hidden;
|
||||
background: image-url("colourPicker/colorpicker_indic.gif") left top;
|
||||
margin: -4px 0 0 0;
|
||||
left: 0px;
|
||||
}
|
||||
.colorpicker_new_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 213px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker_current_color {
|
||||
position: absolute;
|
||||
width: 60px;
|
||||
height: 30px;
|
||||
left: 283px;
|
||||
top: 13px;
|
||||
background: #f00;
|
||||
}
|
||||
.colorpicker input {
|
||||
background-color: transparent;
|
||||
border: 1px solid transparent;
|
||||
position: absolute;
|
||||
font-size: 10px;
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: white;
|
||||
top: 4px;
|
||||
right: 11px;
|
||||
text-align: right;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
height: 14px;
|
||||
}
|
||||
.colorpicker_hex {
|
||||
position: absolute;
|
||||
width: 72px;
|
||||
height: 22px;
|
||||
background: image-url("colourPicker/colorpicker_hex.png") top;
|
||||
left: 212px;
|
||||
top: 142px;
|
||||
}
|
||||
.colorpicker_hex input {
|
||||
right: 6px;
|
||||
}
|
||||
.colorpicker_field {
|
||||
height: 22px;
|
||||
width: 62px;
|
||||
background-position: top;
|
||||
position: absolute;
|
||||
}
|
||||
.colorpicker_field span {
|
||||
position: absolute;
|
||||
width: 12px;
|
||||
height: 22px;
|
||||
overflow: hidden;
|
||||
top: 0;
|
||||
right: 0;
|
||||
cursor: n-resize;
|
||||
}
|
||||
.colorpicker_rgb_r {
|
||||
background-image: image-url("colourPicker/colorpicker_rgb_r.png");
|
||||
top: 52px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_g {
|
||||
background-image: image-url("colourPicker/colorpicker_rgb_g.png");
|
||||
top: 82px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_rgb_b {
|
||||
background-image: image-url("colourPicker/colorpicker_rgb_b.png");
|
||||
top: 112px;
|
||||
left: 212px;
|
||||
}
|
||||
.colorpicker_hsb_h {
|
||||
background-image: image-url("colourPicker/colorpicker_hsb_h.png");
|
||||
top: 52px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_s {
|
||||
background-image: image-url("colourPicker/colorpicker_hsb_s.png");
|
||||
top: 82px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_hsb_b {
|
||||
background-image: image-url("colourPicker/colorpicker_hsb_b.png");
|
||||
top: 112px;
|
||||
left: 282px;
|
||||
}
|
||||
.colorpicker_submit {
|
||||
position: absolute;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background: image-url("colourPicker/colorpicker_submit.png") top;
|
||||
left: 322px;
|
||||
top: 142px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.colorpicker_focus {
|
||||
background-position: center;
|
||||
}
|
||||
.colorpicker_hex.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_submit.colorpicker_focus {
|
||||
background-position: bottom;
|
||||
}
|
||||
.colorpicker_slider {
|
||||
background-position: bottom;
|
||||
}
|