mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 14:49:07 +08:00
FIX: allow staff members to edit staged users preferences
This commit is contained in:
parent
1aa68e085e
commit
c9c6b09f36
|
@ -251,8 +251,8 @@ class ApplicationController < ActionController::Base
|
|||
user = if params[:username]
|
||||
username_lower = params[:username].downcase
|
||||
username_lower.gsub!(/\.json$/, '')
|
||||
find_opts = {username_lower: username_lower}
|
||||
find_opts[:active] = true unless opts[:include_inactive]
|
||||
find_opts = { username_lower: username_lower }
|
||||
find_opts[:active] = true unless opts[:include_inactive] || current_user.staff?
|
||||
User.find_by(find_opts)
|
||||
elsif params[:external_id]
|
||||
external_id = params[:external_id].gsub(/\.json$/, '')
|
||||
|
|
Loading…
Reference in New Issue
Block a user