Class: Identity

Inherits:
ApplicationRecord show all
Includes:
CaseSensitivity, Sortable
Defined in:
app/models/identity.rb,
app/models/identity/uniqueness_scopes.rb

Defined Under Namespace

Modules: UniquenessScopes

Constant Summary

Constants inherited from ApplicationRecord

ApplicationRecord::MAX_PLUCK

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApplicationRecord

cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order

Methods included from SensitiveSerializableHash

#serializable_hash

Class Method Details

.normalize_uid(provider, uid) ⇒ Object


29
30
31
32
33
34
35
# File 'app/models/identity.rb', line 29

def self.normalize_uid(provider, uid)
  if Gitlab::Auth::OAuth::Provider.ldap_provider?(provider)
    Gitlab::Auth::Ldap::Person.normalize_dn(uid)
  else
    uid.to_s
  end
end

Instance Method Details

#ldap?Boolean

Returns:

  • (Boolean)

25
26
27
# File 'app/models/identity.rb', line 25

def ldap?
  Gitlab::Auth::OAuth::Provider.ldap_provider?(provider)
end