Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
administrate / lib / administrate / not_authorized_error.rb
Size: Mime:
module Administrate
  class NotAuthorizedError < StandardError
    def initialize(action:, resource:)
      @action = action
      @resource = resource

      case resource
      when String, Symbol
        super("Not allowed to perform #{action.inspect} on #{resource.inspect}")
      when Module
        super("Not allowed to perform #{action.inspect} on #{resource.name}")
      else
        super(
          "Not allowed to perform #{action.inspect} on the given " +
            resource.class.name
        )
      end
    end
  end
end