class Xcflushd::Authorization
Constants
- ALLOWED
- DENIED
- LIMITS_EXCEEDED
- LIMITS_EXCEEDED_CODE
This is inevitably tied to the 3scale backend code
Public Class Methods
allow()
click to toggle source
# File lib/xcflushd/authorization.rb, line 30 def self.allow ALLOWED end
deny(reason = nil)
click to toggle source
# File lib/xcflushd/authorization.rb, line 38 def self.deny(reason = nil) if reason.nil? DENIED # this test has to be done in case the code changes elsif reason == LIMITS_EXCEEDED_CODE LIMITS_EXCEEDED else new(false, reason) end end
deny_over_limits()
click to toggle source
# File lib/xcflushd/authorization.rb, line 34 def self.deny_over_limits LIMITS_EXCEEDED end
Public Instance Methods
limits_exceeded?()
click to toggle source
# File lib/xcflushd/authorization.rb, line 26 def limits_exceeded? reason == LIMITS_EXCEEDED_CODE end