Class: Identity
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Identity
- Includes:
- CaseSensitivity, Sortable
- Defined in:
- app/models/identity.rb,
app/models/identity/uniqueness_scopes.rb
Defined Under Namespace
Modules: UniquenessScopes
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from ApplicationRecord
at_most, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, underscore, without_order
Class Method Details
.normalize_uid(provider, uid) ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/models/identity.rb', line 26 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
22 23 24 |
# File 'app/models/identity.rb', line 22 def ldap? Gitlab::Auth::OAuth::Provider.ldap_provider?(provider) end |