class Mongo::Auth::Unauthorized

Raised when a user is not authorized on a database.

@since 2.0.0

Public Class Methods

new(user) click to toggle source

Instantiate the new error.

@example Instantiate the error.

Mongo::Auth::Unauthorized.new(user)

@param [ Mongo::Auth::User ] user The unauthorized user.

@since 2.0.0

Calls superclass method
# File lib/mongo/auth.rb, line 109
def initialize(user)
  super("User #{user.name} is not authorized to access #{user.database}.")
end