mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
FIX: Delete the invalid auth cookie even if you hit the rate limit
This commit is contained in:
parent
2faa4c2f5f
commit
569e57f0a9
4 changed files with 27 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue