Skip to content
Snippets Groups Projects
Commit c0b46be5 authored by farhatahmad's avatar farhatahmad Committed by Jesus Federico
Browse files

Added fix for multitenant error (#394)

* Added fix for multitenant error

* Fixed issue with room lock when using ldap

* Fixed test cases

* Fixed rubocop issue

* Included internal documentation for LDAP ENV variables
parent 08f6f327
No related branches found
No related tags found
No related merge requests found
...@@ -24,7 +24,8 @@ class RoomsController < ApplicationController ...@@ -24,7 +24,8 @@ class RoomsController < ApplicationController
unless: -> { !Rails.configuration.enable_email_verification } unless: -> { !Rails.configuration.enable_email_verification }
before_action :find_room, except: :create before_action :find_room, except: :create
before_action :verify_room_ownership, except: [:create, :show, :join, :logout] before_action :verify_room_ownership, except: [:create, :show, :join, :logout]
before_action :verify_room_owner_verified, only: [:show, :join] before_action :verify_room_owner_verified, only: [:show, :join],
unless: -> { !Rails.configuration.enable_email_verification }
# POST / # POST /
def create def create
......
...@@ -18,6 +18,9 @@ ...@@ -18,6 +18,9 @@
module APIConcern module APIConcern
extend ActiveSupport::Concern extend ActiveSupport::Concern
RETURNCODE_SUCCESS = "SUCCESS"
def bbb_endpoint def bbb_endpoint
Rails.configuration.bigbluebutton_endpoint Rails.configuration.bigbluebutton_endpoint
end end
......
...@@ -27,7 +27,6 @@ class Room < ApplicationRecord ...@@ -27,7 +27,6 @@ class Room < ApplicationRecord
belongs_to :owner, class_name: 'User', foreign_key: :user_id belongs_to :owner, class_name: 'User', foreign_key: :user_id
RETURNCODE_SUCCESS = "SUCCESS"
META_LISTED = "gl-listed" META_LISTED = "gl-listed"
# Determines if a user owns a room. # Determines if a user owns a room.
......
...@@ -56,6 +56,13 @@ OFFICE365_SECRET= ...@@ -56,6 +56,13 @@ OFFICE365_SECRET=
# #
# http://docs.bigbluebutton.org/install/greenlight-v2.html#ldap-auth # http://docs.bigbluebutton.org/install/greenlight-v2.html#ldap-auth
# #
# LDAP_SERVER=ldap.example.com
# LDAP_PORT=389
# LDAP_METHOD=plain
# LDAP_UID=uid
# LDAP_BASE=dc=example,dc=com
# LDAP_BIND_DN=cn=admin,dc=example,dc=com
# LDAP_PASSWORD=password
LDAP_SERVER= LDAP_SERVER=
LDAP_PORT= LDAP_PORT=
LDAP_METHOD= LDAP_METHOD=
......
...@@ -74,6 +74,7 @@ describe RoomsController, type: :controller do ...@@ -74,6 +74,7 @@ describe RoomsController, type: :controller do
end end
it "redirects to root if owner of room is not verified" do it "redirects to root if owner of room is not verified" do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
@owner.update_attribute(:email_verified, false) @owner.update_attribute(:email_verified, false)
post :show, params: { room_uid: @owner.main_room } post :show, params: { room_uid: @owner.main_room }
...@@ -162,6 +163,7 @@ describe RoomsController, type: :controller do ...@@ -162,6 +163,7 @@ describe RoomsController, type: :controller do
end end
it "redirects to root if owner of room is not verified" do it "redirects to root if owner of room is not verified" do
allow(Rails.configuration).to receive(:enable_email_verification).and_return(true)
@owner.update_attribute(:email_verified, false) @owner.update_attribute(:email_verified, false)
post :join, params: { room_uid: @room, join_name: @owner.name } post :join, params: { room_uid: @room, join_name: @owner.name }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment