<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/models/identity.rb, branch NicoleSchwartz-Python-Blog</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Adds Identity#for_user for use in an EE MR</title>
<updated>2019-05-24T08:14:19+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2019-05-24T08:14:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=dac520aa5771d942f5371d6ef3e38ea4838ae2c9'/>
<id>dac520aa5771d942f5371d6ef3e38ea4838ae2c9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Inherit from ApplicationRecord instead of ActiveRecord::Base</title>
<updated>2019-03-28T16:18:23+00:00</updated>
<author>
<name>Nick Thomas</name>
<email>nick@gitlab.com</email>
</author>
<published>2019-03-28T13:17:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=013f7cd24c4359d5d704b719d85b6df7ca1fdd55'/>
<id>013f7cd24c4359d5d704b719d85b6df7ca1fdd55</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix failed LDAP logins when nil user_id present</title>
<updated>2019-01-29T19:15:06+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-01-29T06:35:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ab4aba7065b52281fcd1224e1e883fe35128751c'/>
<id>ab4aba7065b52281fcd1224e1e883fe35128751c</id>
<content type='text'>
When a LDAP user signs in the for the first time and if there
is an `Identity` object with `user_id` of `nil`, new users
will not be able to be register until that entry is cleared
because of the way identities are created:

1. First, the User object is built but not saved, so it has no `id`.
2. Then, `user.identities.build(provider: 'ldapmain')` is called,
   but it does not have an associated `user_id` as a result.
3. `User#save` is called, but the `Identity` validation fails if an
   existing entry with `user_id` of `nil` already exists.

The uniqueness validation for `nil` values doesn't make any sense in
this case. We should be enforcing this at the database level with a
foreign key constraint. To work around the issue we can validate
against the user instead, which does the right thing even when
the user isn't saved yet.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56734
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a LDAP user signs in the for the first time and if there
is an `Identity` object with `user_id` of `nil`, new users
will not be able to be register until that entry is cleared
because of the way identities are created:

1. First, the User object is built but not saved, so it has no `id`.
2. Then, `user.identities.build(provider: 'ldapmain')` is called,
   but it does not have an associated `user_id` as a result.
3. `User#save` is called, but the `Identity` validation fails if an
   existing entry with `user_id` of `nil` already exists.

The uniqueness validation for `nil` values doesn't make any sense in
this case. We should be enforcing this at the database level with a
foreign key constraint. To work around the issue we can validate
against the user instead, which does the right thing even when
the user isn't saved yet.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/56734
</pre>
</div>
</content>
</entry>
<entry>
<title>Move Identity.uniqueness_scope to a module</title>
<updated>2018-11-12T13:14:13+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-11-12T13:14:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=9d5f921ab0266bf705ca4402335e347b43c75557'/>
<id>9d5f921ab0266bf705ca4402335e347b43c75557</id>
<content type='text'>
Moving this method to a separate module looks a bit odd, but it allows
for EE to extend the method without also having to redefine a variety of
validation rules.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Moving this method to a separate module looks a bit odd, but it allows
for EE to extend the method without also having to redefine a variety of
validation rules.
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable frozen string in app/models/*.rb</title>
<updated>2018-07-26T23:55:41+00:00</updated>
<author>
<name>gfyoung</name>
<email>gfyoung17@gmail.com</email>
</author>
<published>2018-07-25T09:30:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=50abbd3e53d4f5e3e67543650a13aca9a54b37c2'/>
<id>50abbd3e53d4f5e3e67543650a13aca9a54b37c2</id>
<content type='text'>
Partially addresses #47424.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially addresses #47424.
</pre>
</div>
</content>
</entry>
<entry>
<title>Backport Identity.uniqueness_scope from EE</title>
<updated>2018-05-02T13:36:47+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2018-04-22T21:04:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=d14851f9a36ce4e41e94e21d251589a3d197c423'/>
<id>d14851f9a36ce4e41e94e21d251589a3d197c423</id>
<content type='text'>
Originates in 'SamlProvider has many linked Identities' from EE
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Originates in 'SamlProvider has many linked Identities' from EE
</pre>
</div>
</content>
</entry>
<entry>
<title>Moved o_auth/saml/ldap modules under gitlab/auth</title>
<updated>2018-02-28T15:53:02+00:00</updated>
<author>
<name>Horatiu Eugen Vlad</name>
<email>horatiu@vlad.eu</email>
</author>
<published>2018-02-23T12:10:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1ad5df49b1925f1865e99c3fd8576a762aea9cae'/>
<id>1ad5df49b1925f1865e99c3fd8576a762aea9cae</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fixed user synced attributes metadata after removing current provider</title>
<updated>2018-02-15T09:27:38+00:00</updated>
<author>
<name>Francisco Javier López</name>
<email>fjlopez@gitlab.com</email>
</author>
<published>2018-02-15T09:27:38+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=26af0e2d601401114a0574203a56f5f71417adf3'/>
<id>26af0e2d601401114a0574203a56f5f71417adf3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>LDAP extern_uids are not normalized when updated via API</title>
<updated>2017-12-21T14:31:15+00:00</updated>
<author>
<name>Francisco Javier López</name>
<email>fjlopez@gitlab.com</email>
</author>
<published>2017-12-21T14:31:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8c6b5baba1d784b1615d023c63fb4531713ef8db'/>
<id>8c6b5baba1d784b1615d023c63fb4531713ef8db</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Make sure user email is read only when synced with LDAP</title>
<updated>2017-12-15T11:48:48+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@selenight.nl</email>
</author>
<published>2017-12-13T17:02:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=481b8a71f8ee63758d26a57a6367c091d4b76b09'/>
<id>481b8a71f8ee63758d26a57a6367c091d4b76b09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
