Class: Find

Inherits:
AuthManager::Validation show all
Defined in:
lib/auth_manager/find/find.rb

Constant Summary

Constants inherited from AuthManager::Base

AuthManager::Base::APPS, AuthManager::Base::USERS

Instance Attribute Summary

Attributes inherited from AuthManager::Base

#redis

Instance Method Summary collapse

Methods inherited from AuthManager::Validation

#app_as_param, #user_as_param, #validate_option, #validate_param

Methods inherited from AuthManager::Base

#initialize

Constructor Details

This class inherits a constructor from AuthManager::Base

Instance Method Details

#find_object?(param, option) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
11
12
# File 'lib/auth_manager/find/find.rb', line 6

def find_object?( param, option )
  user = option.fetch(:user) || false
  app = option.fetch(:app) || false
  validate_param(param, option, user, app)
  liste = user ? USERS : APPS
  @redis.sismember( liste, param ) ? true : false
end