FIX: Delete the invalid auth cookie even if you hit the rate limit

This commit is contained in:
Robin Ward
2018-02-09 19:09:54 -05:00
parent 2faa4c2f5f
commit 569e57f0a9
4 changed files with 27 additions and 6 deletions

View File

@ -64,12 +64,12 @@ module Discourse
# When they don't have permission to do something
class InvalidAccess < StandardError
attr_reader :obj, :custom_message
attr_reader :obj, :custom_message, :opts
def initialize(msg = nil, obj = nil, opts = nil)
super(msg)
opts ||= {}
@custom_message = opts[:custom_message] if opts[:custom_message]
@opts = opts || {}
@custom_message = opts[:custom_message] if @opts[:custom_message]
@obj = obj
end
end