Remove multi-domain support on admin user pages
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
refs #166
This commit is contained in:
@@ -4,8 +4,7 @@ class Admin::UsersController < Admin::BaseController
|
||||
|
||||
def index
|
||||
ldap = LdapService.new
|
||||
@ou = params[:ou] || Setting.primary_domain
|
||||
@orgs = ldap.fetch_organizations
|
||||
@ou = Setting.primary_domain
|
||||
@pagy, @users = pagy(User.where(ou: @ou).order(cn: :asc))
|
||||
|
||||
@stats = {
|
||||
@@ -27,8 +26,8 @@ class Admin::UsersController < Admin::BaseController
|
||||
private
|
||||
|
||||
def set_user
|
||||
address = params[:address].split("@")
|
||||
@user = User.where(cn: address.first, ou: address.last).first
|
||||
@user = User.find_by(cn: params[:username], ou: Setting.primary_domain)
|
||||
http_status :not_found unless @user
|
||||
end
|
||||
|
||||
def set_current_section
|
||||
|
||||
Reference in New Issue
Block a user