Class: AuthSourceInternal

Inherits:
AuthSource
  • Object
show all
Defined in:
app/models/auth_source_internal.rb

Instance Method Summary collapse

Methods inherited from AuthSource

authenticate, #test_connection

Methods included from Authorization

#enforce_create_permissions, #enforce_destroy_permissions, #enforce_edit_permissions, #enforce_permissions, included, #permission_failed?

Instance Method Details

#auth_method_nameObject Also known as: to_label


9
10
11
# File 'app/models/auth_source_internal.rb', line 9

def auth_method_name
  "INTERNAL"
end

#authenticate(login, password) ⇒ Object


3
4
5
6
7
# File 'app/models/auth_source_internal.rb', line 3

def authenticate(, password)
  return nil if .blank? || password.blank?

  User.unscoped.first(:conditions => ["login=?", ]).try :matching_password?, password
end

#can_set_password?Boolean


14
15
16
# File 'app/models/auth_source_internal.rb', line 14

def can_set_password?
  true
end