Skip to content

Commit

Permalink
Merge pull request #621 from bigbluebutton/v2.2-alpha
Browse files Browse the repository at this point in the history
v2.2-alpha release
  • Loading branch information
jfederico committed Jul 10, 2019
2 parents e153528 + c7a0c6a commit 5a8758d
Show file tree
Hide file tree
Showing 95 changed files with 914 additions and 1,343 deletions.
11 changes: 7 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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'
Expand Down Expand Up @@ -121,3 +122,5 @@ gem 'random_password'

# Adds helpers for the Google reCAPTCHA API
gem "recaptcha"

gem 'i18n-language-mapping', '~> 0.1.0'
49 changes: 32 additions & 17 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,9 @@
!Status](https://coveralls.io/repos/github/bigbluebutton/greenlight/badge.svg?branch=master)
![Docker Pulls](https://img.shields.io/docker/pulls/bigbluebutton/greenlight.svg)

> 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.
Expand Down
Binary file added app/assets/images/ldap-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
124 changes: 79 additions & 45 deletions app/assets/javascripts/admins.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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()
});
})
}
1 change: 0 additions & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,4 @@
//= require tabler
//= require tabler.plugins
//= require jquery_ujs
//= require colorpicker
//= require_tree .
13 changes: 13 additions & 0 deletions app/assets/stylesheets/admins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
.user-role {
color: white !important;
}

.user-email {
max-width: 250px;
}
}

#clear-search {
Expand All @@ -41,4 +45,13 @@

.authentication-required{
padding-top: 2px;
}

#site_settings {
.colorinput-color {
text-align: center;
padding-top: 4px;
height: 2rem;
width: 2rem;
}
}
1 change: 0 additions & 1 deletion app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
@import "tabler/variables";
@import "bootstrap";
@import "tabler-custom";
@import "colorpicker";

@import "utilities/variables";
@import "admins";
Expand Down
13 changes: 12 additions & 1 deletion app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
}
}

.customBtn-microsoft_office365 {
.customBtn-office365 {
@extend .customBtn;
background: #f65314;

Expand All @@ -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;
}
8 changes: 7 additions & 1 deletion app/controllers/admins_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -153,6 +153,12 @@ def registration_method
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
Expand Down
Loading

0 comments on commit 5a8758d

Please sign in to comment.