FIX: Don't raise error when admin access is invalid.
This commit is contained in:
parent
37b256e7f2
commit
4b75ad5110
|
@ -10,6 +10,8 @@ class AdminConstraint
|
|||
return false if @require_master && RailsMultisite::ConnectionManagement.current_db != "default"
|
||||
provider = Discourse.current_user_provider.new(request.env)
|
||||
provider.current_user && provider.current_user.admin?
|
||||
rescue Discourse::InvalidAccess
|
||||
false
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue