Greenlight encountered a database migration error.
This may be because you haven't updated to Greenlight 2.0.
+ If you are not an administrator, please contact one.
+diff --git a/.dockerignore b/.dockerignore index 328b891a..ba912f55 100644 --- a/.dockerignore +++ b/.dockerignore @@ -14,7 +14,7 @@ tmp /db/**/*.sqlite3-journal /db/production public/assets -public/gl +public/b coverage/ spec/tmp .rvmrc diff --git a/.gitignore b/.gitignore index d4eff4a2..385c1850 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,7 @@ # Ignore static assets. /public/system/** /public/assets/** -/public/gl/** +/public/b/** # Ignore production paths. /db/production diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 00000000..73462a5a --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +2.5.1 diff --git a/Dockerfile b/Dockerfile index 65f890de..6b4d34b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ FROM ruby:2.5 # Install app dependencies. -RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs +RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs # Set an environment variable for the install location. ENV RAILS_ROOT /usr/src/app @@ -25,8 +25,8 @@ RUN bundle install --without development test --deployment --clean RUN bundle exec rake assets:clean RUN bundle exec rake assets:precompile -# Expose port 3000. -EXPOSE 3000 +# Expose port 80. +EXPOSE 80 # Start the application. CMD ["bin/start"] diff --git a/README.md b/README.md index ce64bb4d..fbdda367 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Greenlight +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/install/greenlight-v2.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. @@ -8,9 +10,13 @@ Greenlight is a simple front-end interface for your BigBlueButton server. At it' * Invite others to your room using a simple URL. * View recordings and share them with others. -Furthermore, Greenlight is completely configurable. This means you can turn on/off features to make Greenlight fit your specific use case. For more information on Greenlight and it's features, see our [documentation](http://docs.bigbluebutton.org/install/greenlight.html). +Interested? Try Greenlight out on our [demo server](https://demo.bigbluebutton.org/gl)! -For a overview of how GreenLight works, checkout our [Introduction to Greenlight Video](https://youtu.be/yGX3JCv7OVM). +Greenlight is also completely configurable. This means you can turn on/off features to make Greenlight fit your specific use case. For more information on Greenlight and its features, see our [documentation](http://docs.bigbluebutton.org/install/greenlight-v2.html). + +For a overview of how Greenlight works, checkout our Introduction to Greenlight Video: + +[](https://youtu.be/Hso8yLzkqj8) ## Installation on a BigBlueButton Server @@ -20,7 +26,7 @@ For information on installing Greenlight, checkout our [Installing Greenlight on ## Source Code & Contributing -GreenLight is built using Ruby on Rails. Many developers already know Rails well, and we wanted to create both a full front-end to BigBlueButton but also a reference implementation of how to fully leverage the [BigBlueButton API](http://docs.bigbluebutton.org/dev/api.html). +Greenlight is built using Ruby on Rails. Many developers already know Rails well, and we wanted to create both a full front-end to BigBlueButton but also a reference implementation of how to fully leverage the [BigBlueButton API](http://docs.bigbluebutton.org/dev/api.html). We invite you to build upon GreenLight and help make it better. See [Contributing to BigBlueButton](http://docs.bigbluebutton.org/support/faq.html#contributing-to-bigbluebutton). diff --git a/app/assets/stylesheets/main.scss b/app/assets/stylesheets/main.scss index 616e3290..27a3d0c4 100644 --- a/app/assets/stylesheets/main.scss +++ b/app/assets/stylesheets/main.scss @@ -21,3 +21,18 @@ transform: translateY(-50%); margin-top: 50%; } + +.or-line { + div { + width: 100%; + height: 16px; + border-bottom: 1px solid #d3d3d3; + text-align: center; + span { + font-size: 120%; + background-color: #ffffff; + padding: 0 10px; + color: #d3d3d3 + } + } +} diff --git a/app/assets/stylesheets/rooms.scss b/app/assets/stylesheets/rooms.scss index 42daca51..6066d2db 100644 --- a/app/assets/stylesheets/rooms.scss +++ b/app/assets/stylesheets/rooms.scss @@ -7,7 +7,7 @@ } .thumbnail { - height: 40% !important; + height: 60px !important; width: auto; } @@ -22,3 +22,7 @@ .home-indicator { font-size: 22px !important; } + +.btn-del-room { + width: 70% !important; +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 0f07f83b..2f720083 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -5,6 +5,13 @@ require 'bigbluebutton_api' class ApplicationController < ActionController::Base include SessionsHelper + before_action :migration_error? + + # Show an information page when migration fails and there is a version error. + def migration_error? + render :migration_error unless ENV["DB_MIGRATE_FAILED"].blank? + end + protect_from_forgery with: :exception MEETING_NAME_LIMIT = 90 @@ -56,7 +63,7 @@ class ApplicationController < ActionController::Base user_is_moderator: false, meeting_logout_url: request.base_url + logout_room_path(@room), meeting_recorded: true, - moderator_message: "#{invite_msg}\n\n #{request.base_url + relative_root + room_path(@room)}", + moderator_message: "#{invite_msg}\n\n #{request.base_url + room_path(@room)}", } end end diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index 218eea7e..57569b3a 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -65,8 +65,9 @@ class RoomsController < ApplicationController # DELETE /:room_uid def destroy + p @room # Don't delete the users home room. - @room.destroy if @room != current_user.main_room + @room.destroy if @room.owned_by?(current_user) && @room != current_user.main_room redirect_to current_user.main_room end @@ -90,14 +91,6 @@ class RoomsController < ApplicationController redirect_to @room end - # POST /:room_uid/home - def home - current_user.main_room = @room - current_user.save - - redirect_to @room - end - # POST /:room_uid/:record_id def update_recording meta = { diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index af6f531b..41a623d8 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -19,18 +19,6 @@ class SessionsController < ApplicationController end end - # POST /launch - def launch - # This will recieve a encoded POST from a launcher that - # contains the provider, and all user information. The - # launcher is what does the authentication, so we know - # that the user is who they say they are. We just need - # to use our secret to decode it and then log them in - # to GreenLight (or sign them up). - - # User.from_launch() - end - # GET/POST /auth/:provider/callback def omniauth user = User.from_omniauth(request.env['omniauth.auth']) diff --git a/app/models/user.rb b/app/models/user.rb index 019c4d74..a087c47f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -23,8 +23,8 @@ class User < ApplicationRecord # Generates a user from omniauth. def from_omniauth(auth) find_or_initialize_by(social_uid: auth['uid'], provider: auth['provider']).tap do |u| - u.name = send("#{auth['provider']}_name", auth) - u.username = send("#{auth['provider']}_username", auth) + u.name = send("#{auth['provider']}_name", auth) unless u.name + u.username = send("#{auth['provider']}_username", auth) unless u.username u.email = send("#{auth['provider']}_email", auth) u.image = send("#{auth['provider']}_image", auth) u.save! diff --git a/app/views/application/migration_error.html.erb b/app/views/application/migration_error.html.erb new file mode 100644 index 00000000..8d90ff3d --- /dev/null +++ b/app/views/application/migration_error.html.erb @@ -0,0 +1,16 @@ +
If you are not an administrator, please contact one.
+