Remove multi-domain support on admin user pages
All checks were successful
continuous-integration/drone/push Build is passing

refs #166
This commit is contained in:
2024-02-10 08:54:28 +01:00
parent fcda3b9c8c
commit 8747ce4eb0
4 changed files with 12 additions and 22 deletions

View File

@@ -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