Sha256: 8a19fbc6faf59a8f953f725f6f0724977609e23184d2b1d8854219568a39713c

Contents?: true

Size: 760 Bytes

Versions: 3

Compression:

Stored size: 760 Bytes

Contents

# @author Tobias Feistmantl
module ActionControl
	# Generic authorization error.
	# Other, more specific, errors inherit from this one.
	#
	# @raise [AuthorizationError]
	#    if something generic is happening.
	class AuthorizationError < StandardError
	end

	# Error for controllers in which authorization isn't handled.
	#
	# @raise [AuthorizationNotPerformedError]
	#    if the #authorized? method isn't defined
	#    in the controller class.
	class AuthorizationNotPerformedError < AuthorizationError
	end

	# Error if user unauthorized.
	#
	# @raise [NotAuthorizedError]
	#    if authorized? isn't returning true.
	#
	# @note
	#    Should always be called at the end
	#    of the #authorize! method.
	class NotAuthorizedError < AuthorizationError
	end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
action_control-0.1 lib/action_control/errors.rb
action_control-0.0.3 lib/action_control/errors.rb
action_control-0.0.2 lib/action_control/errors.rb