forked from External/greenlight
Added setting for admin to limit the number of rooms for the user (#607)
This commit is contained in:
committed by
Jesus Federico
parent
4f2b190239
commit
e4f50026f1
@ -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
|
||||
|
Reference in New Issue
Block a user