Commit df9dad8d authored by GitLab Bot's avatar GitLab Bot

Automatic merge of gitlab-org/gitlab-ce master

parents 59a62b5c ebb90a09
...@@ -863,7 +863,7 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -863,7 +863,7 @@ button.mini-pipeline-graph-dropdown-toggle {
height: $ci-action-dropdown-svg-size; height: $ci-action-dropdown-svg-size;
fill: $gl-text-color-secondary; fill: $gl-text-color-secondary;
position: relative; position: relative;
top: 0; top: 1px;
vertical-align: initial; vertical-align: initial;
} }
} }
...@@ -871,7 +871,7 @@ button.mini-pipeline-graph-dropdown-toggle { ...@@ -871,7 +871,7 @@ button.mini-pipeline-graph-dropdown-toggle {
// SVGs in the commit widget and mr widget // SVGs in the commit widget and mr widget
a.ci-action-icon-container.ci-action-icon-wrapper svg { a.ci-action-icon-container.ci-action-icon-wrapper svg {
top: 2px; top: 4px;
} }
.scrollable-menu { .scrollable-menu {
......
...@@ -8,7 +8,7 @@ class Identity < ActiveRecord::Base ...@@ -8,7 +8,7 @@ class Identity < ActiveRecord::Base
validates :provider, presence: true validates :provider, presence: true
validates :extern_uid, allow_blank: true, uniqueness: { scope: UniquenessScopes.scopes, case_sensitive: false } validates :extern_uid, allow_blank: true, uniqueness: { scope: UniquenessScopes.scopes, case_sensitive: false }
validates :user_id, uniqueness: { scope: UniquenessScopes.scopes } validates :user, uniqueness: { scope: UniquenessScopes.scopes }
before_save :ensure_normalized_extern_uid, if: :extern_uid_changed? before_save :ensure_normalized_extern_uid, if: :extern_uid_changed?
after_destroy :clear_user_synced_attributes, if: :user_synced_attributes_metadata_from_provider? after_destroy :clear_user_synced_attributes, if: :user_synced_attributes_metadata_from_provider?
......
---
title: Resolve Pipeline stages job action button icon is not aligned
merge_request: 24577
author:
type: fixed
---
title: Fix failed LDAP logins when nil user_id present
merge_request: 24749
author:
type: fixed
...@@ -85,10 +85,10 @@ You can [search and filter the results](../../search/index.md#issues-and-merge-r ...@@ -85,10 +85,10 @@ You can [search and filter the results](../../search/index.md#issues-and-merge-r
![Group Issues list view](img/group_merge_requests_list_view.png) ![Group Issues list view](img/group_merge_requests_list_view.png)
## Removing the source branch ## Deleting the source branch
When creating a merge request, select the "Remove source branch when merge When creating a merge request, select the "Delete source branch when merge
request accepted" option and the source branch will be removed when the merge request accepted" option and the source branch will be deleted when the merge
request is merged. request is merged.
This option is also visible in an existing merge request next to the merge This option is also visible in an existing merge request next to the merge
...@@ -96,10 +96,10 @@ request button and can be selected/deselected before merging. It's only visible ...@@ -96,10 +96,10 @@ request button and can be selected/deselected before merging. It's only visible
to users with [Maintainer permissions](../../permissions.md) in the source project. to users with [Maintainer permissions](../../permissions.md) in the source project.
If the user viewing the merge request does not have the correct permissions to If the user viewing the merge request does not have the correct permissions to
remove the source branch and the source branch is set for removal, the merge delete the source branch and the source branch is set for deletion, the merge
request widget will show the "Removes source branch" text. request widget will show the "Deletes source branch" text.
![Remove source branch status](img/remove_source_branch_status.png) ![Delete source branch status](img/remove_source_branch_status.png)
## Allow collaboration on merge requests across forks ## Allow collaboration on merge requests across forks
......
...@@ -10,6 +10,40 @@ describe Identity do ...@@ -10,6 +10,40 @@ describe Identity do
it { is_expected.to respond_to(:extern_uid) } it { is_expected.to respond_to(:extern_uid) }
end end
describe 'validations' do
set(:user) { create(:user) }
context 'with existing user and provider' do
before do
create(:identity, provider: 'ldapmain', user_id: user.id)
end
it 'returns false for a duplicate entry' do
identity = user.identities.build(provider: 'ldapmain', user_id: user.id)
expect(identity.validate).to be_falsey
end
it 'returns true when a different provider is used' do
identity = user.identities.build(provider: 'gitlab', user_id: user.id)
expect(identity.validate).to be_truthy
end
end
context 'with newly-created user' do
before do
create(:identity, provider: 'ldapmain', user_id: nil)
end
it 'successfully validates even with a nil user_id' do
identity = user.identities.build(provider: 'ldapmain')
expect(identity.validate).to be_truthy
end
end
end
describe '#is_ldap?' do describe '#is_ldap?' do
let(:ldap_identity) { create(:identity, provider: 'ldapmain') } let(:ldap_identity) { create(:identity, provider: 'ldapmain') }
let(:other_identity) { create(:identity, provider: 'twitter') } let(:other_identity) { create(:identity, provider: 'twitter') }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment