forked from External/greenlight
add ability to configure terms and conditions
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
class RoomsController < ApplicationController
|
||||
|
||||
before_action :validate_accepted_terms, unless: -> { !Rails.configuration.terms }
|
||||
before_action :find_room, except: :create
|
||||
before_action :verify_room_ownership, except: [:create, :show, :join, :logout]
|
||||
|
||||
@ -159,4 +160,8 @@ class RoomsController < ApplicationController
|
||||
redirect_to root_path
|
||||
end
|
||||
end
|
||||
|
||||
def validate_accepted_terms
|
||||
redirect_to terms_path unless current_user.accepted_terms
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user