mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
automatically approve invited users on forum where moderators must approve (keep in mind only moderators can invite)
speed up specs a touch allow invite controller to accept an email in absence of user (cleans up API)
This commit is contained in:
@@ -59,9 +59,9 @@ module CurrentUser
|
||||
@current_user.update_ip_address!(request.remote_ip)
|
||||
end
|
||||
|
||||
# possible we have an api call, impersonate
|
||||
# possible we have an api call, impersonate
|
||||
unless @current_user
|
||||
if api_key = request["api_key"]
|
||||
if api_key = request["api_key"]
|
||||
if api_username = request["api_username"]
|
||||
if SiteSetting.api_key_valid?(api_key)
|
||||
@current_user = User.where(username_lower: api_username.downcase).first
|
||||
|
||||
Reference in New Issue
Block a user