module SweetActions::Authorization

Private Instance Methods

authorize() click to toggle source
# File lib/sweet_actions/authorization.rb, line 9
def authorize
  return unless authorize?
  return true if authorized?
  unauthorized
end
authorize?() click to toggle source
# File lib/sweet_actions/authorization.rb, line 5
def authorize?
  SweetActions.configuration.authorize_rest_requests
end
authorized?() click to toggle source
# File lib/sweet_actions/authorization.rb, line 15
def authorized?
  false # lock it down by default
end
unauthorized() click to toggle source
# File lib/sweet_actions/authorization.rb, line 19
def unauthorized
  raise Exceptions::NotAuthorized
end