Commit f2a4cced authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett

Merge branch 'ce-to-ee-2017-05-17' of gitlab.com:gitlab-org/gitlab-ee into ce-to-ee-2017-05-17

parents d10eb61e 7508f949
......@@ -166,13 +166,9 @@
clicked: function(options) {
const { $el, e } = options;
let selected = options.selectedObj;
<<<<<<< HEAD
var data, isIssueIndex, isMRIndex, page, boardsStore;
if (!selected) return;
=======
var data, isIssueIndex, isMRIndex, isSelecting, page, boardsStore;
>>>>>>> upstream/master
if (!selected) return;
page = $('body').data('page');
isIssueIndex = page === 'projects:issues:index';
isMRIndex = (page === page && page === 'projects:merge_requests:index');
......
......@@ -26,12 +26,8 @@ export { default as ConflictsState } from './components/states/mr_widget_conflic
export { default as NothingToMergeState } from './components/states/mr_widget_nothing_to_merge';
export { default as MissingBranchState } from './components/states/mr_widget_missing_branch';
export { default as NotAllowedState } from './components/states/mr_widget_not_allowed';
<<<<<<< HEAD
export { default as ReadyToMergeState } from './ee/components/states/mr_widget_ready_to_merge';
=======
export { default as ReadyToMergeState } from './components/states/mr_widget_ready_to_merge';
export { default as SHAMismatchState } from './components/states/mr_widget_sha_mismatch';
>>>>>>> upstream/master
export { default as UnresolvedDiscussionsState } from './components/states/mr_widget_unresolved_discussions';
export { default as PipelineBlockedState } from './components/states/mr_widget_pipeline_blocked';
export { default as PipelineFailedState } from './components/states/mr_widget_pipeline_failed';
......
......@@ -12,6 +12,7 @@
# active: boolean
# blocked: boolean
# external: boolean
# skip_ldap: boolean
#
class UsersFinder
attr_accessor :current_user, :params
......@@ -29,6 +30,7 @@ class UsersFinder
users = by_active(users)
users = by_external_identity(users)
users = by_external(users)
users = by_ldap(users)
users
end
......@@ -71,4 +73,10 @@ class UsersFinder
users.external
end
def by_non_ldap(users)
return users unless params[:skip_ldap]
users.non_ldap
end
end
......@@ -7,13 +7,10 @@ module SubmoduleHelper
def submodule_links(submodule_item, ref = nil, repository = @repository)
url = repository.submodule_url_for(ref, submodule_item.path)
<<<<<<< HEAD
=======
if url == '.' || url == './'
url = File.join(Gitlab.config.gitlab.url, @project.full_path)
end
>>>>>>> upstream/master
if url =~ /([^\/:]+)\/([^\/]+(?:\.git)?)\Z/
namespace, project = $1, $2
project.sub!(/\.git\z/, '')
......
......@@ -128,17 +128,10 @@ class Group < Namespace
allowed_by_projects
end
<<<<<<< HEAD
def avatar_url(size = nil, scale = nil)
if self[:avatar].present?
[gitlab_config.url, avatar.url].join
end
=======
def avatar_url(**args)
# We use avatar_path instead of overriding avatar_url because of carrierwave.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
avatar_path(args)
>>>>>>> upstream/master
end
def lfs_enabled?
......
......@@ -916,19 +916,10 @@ class Project < ActiveRecord::Base
repository.avatar
end
<<<<<<< HEAD
def avatar_url(size = nil, scale = nil)
if self[:avatar].present?
[gitlab_config.url, avatar.url].join
elsif avatar_in_git
Gitlab::Routing.url_helpers.namespace_project_avatar_url(namespace, self)
end
=======
def avatar_url(**args)
# We use avatar_path instead of overriding avatar_url because of carrierwave.
# See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/11001/diffs#note_28659864
avatar_path(args) || (Gitlab::Routing.url_helpers.namespace_project_avatar_url(namespace, self) if avatar_in_git)
>>>>>>> upstream/master
end
# For compatibility with old code
......
......@@ -24,25 +24,10 @@
%li
%code= liveness_url(token: current_application_settings.health_check_access_token)
%li
<<<<<<< HEAD
%code= health_check_url(token: current_application_settings.health_check_access_token, format: :xml)
%p.light
You can also ask for the status of specific services:
%ul
%li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :cache)
%li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :database)
%li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :migrations)
%code= metrics_url(token: current_application_settings.health_check_access_token)
- if Gitlab::Geo.secondary?
%li
%code= health_check_url(token: current_application_settings.health_check_access_token, checks: :geo)
=======
%code= metrics_url(token: current_application_settings.health_check_access_token)
>>>>>>> upstream/master
%hr
.panel.panel-default
.panel-heading
......
......@@ -150,12 +150,9 @@ var config = {
'notebook_viewer',
'pdf_viewer',
'pipelines',
<<<<<<< HEAD
'mr_widget_ee',
'issue_show',
'balsamiq_viewer',
=======
>>>>>>> upstream/master
'pipelines_graph',
'schedule_form',
'schedules_index',
......
......@@ -11,11 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
<<<<<<< HEAD
ActiveRecord::Schema.define(version: 20170511101000) do
=======
ActiveRecord::Schema.define(version: 20170516183131) do
>>>>>>> upstream/master
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -538,7 +534,6 @@ ActiveRecord::Schema.define(version: 20170516183131) do
add_index "identities", ["user_id"], name: "index_identities_on_user_id", using: :btree
<<<<<<< HEAD
create_table "index_statuses", force: :cascade do |t|
t.integer "project_id", null: false
t.datetime "indexed_at"
......@@ -550,10 +545,7 @@ ActiveRecord::Schema.define(version: 20170516183131) do
add_index "index_statuses", ["project_id"], name: "index_index_statuses_on_project_id", unique: true, using: :btree
create_table "issue_assignees", force: :cascade do |t|
=======
create_table "issue_assignees", id: false, force: :cascade do |t|
>>>>>>> upstream/master
t.integer "user_id", null: false
t.integer "issue_id", null: false
end
......@@ -1150,12 +1142,8 @@ ActiveRecord::Schema.define(version: 20170516183131) do
t.integer "repository_size_limit", limit: 8
t.integer "sync_time", default: 60, null: false
t.boolean "printing_merge_request_link_enabled", default: true, null: false
<<<<<<< HEAD
t.integer "auto_cancel_pending_pipelines", default: 0, null: false
t.boolean "service_desk_enabled"
=======
t.integer "auto_cancel_pending_pipelines", default: 1, null: false
>>>>>>> upstream/master
t.boolean "service_desk_enabled"
t.string "import_jid"
t.integer "cached_markdown_version"
t.datetime "last_repository_updated_at"
......@@ -1623,13 +1611,8 @@ ActiveRecord::Schema.define(version: 20170516183131) do
t.string "token"
t.boolean "pipeline_events", default: false, null: false
t.boolean "confidential_issues_events", default: false, null: false
<<<<<<< HEAD
t.boolean "repository_update_events", default: false, null: false
t.boolean "job_events", default: false, null: false
=======
t.boolean "job_events", default: false, null: false
t.boolean "repository_update_events", default: false, null: false
>>>>>>> upstream/master
end
add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
......
......@@ -4,11 +4,7 @@
There are two editions of GitLab: [Enterprise Edition](https://about.gitlab.com/gitlab-ee/) (EE) and [Community Edition](https://about.gitlab.com/gitlab-ce/) (CE). GitLab CE is delivered via git from the [gitlabhq repository](https://gitlab.com/gitlab-org/gitlab-ce/tree/master). New versions of GitLab are released in stable branches and the master branch is for bleeding edge development.
<<<<<<< HEAD
EE releases are available not long after CE releases. To obtain GitLab EE there is a [repository at gitlab.com](https://gitlab.com/gitlab-org/gitlab-ee). For more information about the release process see the section 'New versions and upgrading' in the readme.
=======
EE releases are available not long after CE releases. To obtain the GitLab EE there is a [repository at gitlab.com](https://gitlab.com/gitlab-org/gitlab-ee). For more information about the release process see the section 'New versions and upgrading' in the readme.
>>>>>>> upstream/master
Both EE and CE require some add-on components called gitlab-shell and Gitaly. These components are available from the [gitlab-shell](https://gitlab.com/gitlab-org/gitlab-shell/tree/master) and [gitaly](https://gitlab.com/gitlab-org/gitaly/tree/master) repositories respectively. New versions are usually tags but staying on the master branch will give you the latest stable version. New releases are generally around the same time as GitLab CE releases with exception for informal security updates deemed critical.
......
......@@ -19,11 +19,7 @@ This page gathers all the resources for the topic **Authentication** within GitL
- [Enforce Two-factor Authentication (2FA)](../../security/two_factor_authentication.md#enforce-two-factor-authentication-2fa)
- **Articles:**
- [How to Configure LDAP with GitLab CE](../../articles/how_to_configure_ldap_gitlab_ce/index.md)
<<<<<<< HEAD
- [How to Configure LDAP with GitLab EE](../../articles/how_to_configure_ldap_gitlab_ee/index.md)
=======
- [How to Configure LDAP with GitLab EE](https://docs.gitlab.com/ee/articles/how_to_configure_ldap_gitlab_ee/)
>>>>>>> upstream/master
- [Feature Highlight: LDAP Integration](https://about.gitlab.com/2014/07/10/feature-highlight-ldap-sync/)
- [Debugging LDAP](https://about.gitlab.com/handbook/support/workflows/ldap/debugging_ldap.html)
- **Integrations:**
......
......@@ -605,13 +605,8 @@ module API
SlackService,
MattermostService,
MicrosoftTeamsService,
<<<<<<< HEAD
TeamcityService,
JenkinsService,
JenkinsDeprecatedService
=======
TeamcityService
>>>>>>> upstream/master
JenkinsService
]
if Rails.env.development?
......
......@@ -59,21 +59,7 @@ module API
authenticated_as_admin! if params[:external].present? || (params[:extern_uid].present? && params[:provider].present?)
<<<<<<< HEAD
users = User.all
users = User.where(username: params[:username]) if params[:username]
users = users.active if params[:active]
users = users.search(params[:search]) if params[:search].present?
users = users.blocked if params[:blocked]
users = users.non_ldap if params[:skip_ldap]
if current_user.admin?
users = users.joins(:identities).merge(Identity.with_extern_uid(params[:provider], params[:extern_uid])) if params[:extern_uid] && params[:provider]
users = users.external if params[:external]
end
=======
users = UsersFinder.new(current_user, params).execute
>>>>>>> upstream/master
entity = current_user.admin? ? Entities::UserPublic : Entities::UserBasic
present paginate(users), with: entity
......
......@@ -7,12 +7,7 @@ RSpec.describe 'Dashboard Group', feature: true do
it 'creates new group', js: true do
visit dashboard_groups_path
<<<<<<< HEAD
click_link 'New group'
=======
find('.btn-new').trigger('click')
>>>>>>> upstream/master
new_path = 'Samurai'
new_description = 'Tokugawa Shogunate'
......
......@@ -45,6 +45,22 @@ describe UsersFinder do
expect(users).to contain_exactly(user, user1, user2, omniauth_user)
end
context 'with LDAP users' do
let!(:ldap_user) { create(:omniauth_user, provider: 'ldap') }
it 'returns ldap users by default' do
users = described_class.new(user).execute
expect(users).to contain_exactly(user, user1, user2, omniauth_user, ldap_user)
end
it 'returns only non-ldap users with skip_ldap: true' do
users = described_class.new(user, skip_ldap: true).execute
expect(users).not_to contain_exactly(user, user1, user2, omniauth_user)
end
end
end
context 'with an admin user' do
......
......@@ -263,61 +263,6 @@ describe ApplicationSetting, models: true do
end
end
<<<<<<< HEAD
describe '#repository_size_limit column' do
it 'support values up to 8 exabytes' do
setting.update_column(:repository_size_limit, 8.exabytes - 1)
setting.reload
expect(setting.repository_size_limit).to eql(8.exabytes - 1)
end
end
describe '#elasticsearch_url' do
it 'presents a single URL as a one-element array' do
setting.elasticsearch_url = 'http://example.com'
expect(setting.elasticsearch_url).to eq(%w[http://example.com])
end
it 'presents multiple URLs as a many-element array' do
setting.elasticsearch_url = 'http://example.com,https://invalid.invalid:9200'
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://invalid.invalid:9200])
end
it 'strips whitespace from around URLs' do
setting.elasticsearch_url = ' http://example.com, https://invalid.invalid:9200 '
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://invalid.invalid:9200])
end
it 'strips trailing slashes from URLs' do
setting.elasticsearch_url = 'http://example.com/, https://example.com:9200/, https://example.com:9200/prefix//'
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://example.com:9200 https://example.com:9200/prefix])
end
end
describe '#elasticsearch_config' do
it 'places all elasticsearch configuration values into a hash' do
setting.update!(
elasticsearch_url: 'http://example.com:9200',
elasticsearch_aws: false,
elasticsearch_aws_region: 'test-region',
elasticsearch_aws_access_key: 'test-access-key',
elasticsearch_aws_secret_access_key: 'test-secret-access-key'
)
expect(setting.elasticsearch_config).to eq(
url: ['http://example.com:9200'],
aws: false,
aws_region: 'test-region',
aws_access_key: 'test-access-key',
aws_secret_access_key: 'test-secret-access-key'
)
=======
describe 'usage ping settings' do
context 'when the usage ping is disabled in gitlab.yml' do
before do
......@@ -377,7 +322,62 @@ describe ApplicationSetting, models: true do
expect(setting.usage_ping_enabled).to be_truthy
end
end
>>>>>>> upstream/master
end
end
describe '#repository_size_limit column' do
it 'support values up to 8 exabytes' do
setting.update_column(:repository_size_limit, 8.exabytes - 1)
setting.reload
expect(setting.repository_size_limit).to eql(8.exabytes - 1)
end
end
describe '#elasticsearch_url' do
it 'presents a single URL as a one-element array' do
setting.elasticsearch_url = 'http://example.com'
expect(setting.elasticsearch_url).to eq(%w[http://example.com])
end
it 'presents multiple URLs as a many-element array' do
setting.elasticsearch_url = 'http://example.com,https://invalid.invalid:9200'
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://invalid.invalid:9200])
end
it 'strips whitespace from around URLs' do
setting.elasticsearch_url = ' http://example.com, https://invalid.invalid:9200 '
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://invalid.invalid:9200])
end
it 'strips trailing slashes from URLs' do
setting.elasticsearch_url = 'http://example.com/, https://example.com:9200/, https://example.com:9200/prefix//'
expect(setting.elasticsearch_url).to eq(%w[http://example.com https://example.com:9200 https://example.com:9200/prefix])
end
end
describe '#elasticsearch_config' do
it 'places all elasticsearch configuration values into a hash' do
setting.update!(
elasticsearch_url: 'http://example.com:9200',
elasticsearch_aws: false,
elasticsearch_aws_region: 'test-region',
elasticsearch_aws_access_key: 'test-access-key',
elasticsearch_aws_secret_access_key: 'test-secret-access-key'
)
expect(setting.elasticsearch_config).to eq(
url: ['http://example.com:9200'],
aws: false,
aws_region: 'test-region',
aws_access_key: 'test-access-key',
aws_secret_access_key: 'test-secret-access-key'
)
end
end
end
......@@ -188,8 +188,10 @@ describe Group, models: true do
expect(group.avatar_url).to eq(avatar_path)
expect(group.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
<<<<<<< HEAD
it { should eq "http://#{Gitlab.config.gitlab.host}#{avatar_path}" }
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(group.avatar_url).to eq([gitlab_host, avatar_path].join)
end
context 'when in a geo secondary node' do
let(:geo_url) { 'http://geo.example.com' }
......@@ -200,11 +202,6 @@ describe Group, models: true do
end
it { should eq "#{geo_url}#{avatar_path}" }
=======
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(group.avatar_url).to eq([gitlab_host, avatar_path].join)
>>>>>>> upstream/master
end
end
end
......
......@@ -974,8 +974,14 @@ describe Project, models: true do
let(:avatar_path) { "/uploads/project/avatar/#{project.id}/dk.png" }
let(:gitlab_host) { "http://#{Gitlab.config.gitlab.host}" }
<<<<<<< HEAD
it { should eq "http://#{Gitlab.config.gitlab.host}#{avatar_path}" }
it 'shows correct url' do
expect(project.avatar_url).to eq(avatar_path)
expect(project.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(project.avatar_url).to eq([gitlab_host, avatar_path].join)
end
context 'When in a geo secondary node' do
let(:geo_url) { 'http://geo.example.com' }
......@@ -986,16 +992,6 @@ describe Project, models: true do
end
it { should eq "#{geo_url}#{avatar_path}" }
=======
it 'shows correct url' do
expect(project.avatar_url).to eq(avatar_path)
expect(project.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(project.avatar_url).to eq([gitlab_host, avatar_path].join)
>>>>>>> upstream/master
end
end
context 'When avatar file in git' do
......
......@@ -993,8 +993,14 @@ describe User, models: true do
let(:gitlab_host) { "http://#{Gitlab.config.gitlab.host}" }
let(:avatar_path) { "/uploads/user/avatar/#{user.id}/dk.png" }
<<<<<<< HEAD
it { should eq "http://#{Gitlab.config.gitlab.host}#{avatar_path}" }
it 'shows correct avatar url' do
expect(user.avatar_url).to eq(avatar_path)
expect(user.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(user.avatar_url).to eq([gitlab_host, avatar_path].join)
end
context 'when in a geo secondary node' do
let(:geo_url) { 'http://geo.example.com' }
......@@ -1005,15 +1011,6 @@ describe User, models: true do
end
it { should eq "#{geo_url}#{avatar_path}" }
=======
it 'shows correct avatar url' do
expect(user.avatar_url).to eq(avatar_path)
expect(user.avatar_url(only_path: false)).to eq([gitlab_host, avatar_path].join)
allow(ActionController::Base).to receive(:asset_host).and_return(gitlab_host)
expect(user.avatar_url).to eq([gitlab_host, avatar_path].join)
>>>>>>> upstream/master
end
end
end
......@@ -1978,7 +1975,34 @@ describe User, models: true do
end
end
<<<<<<< HEAD
context '#invalidate_issue_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for issue counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_issues_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_issue_cache_counts
end
end
context '#invalidate_merge_request_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for Merge Request counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_merge_requests_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_merge_request_cache_counts
end
end
describe '#forget_me!' do
subject { create(:user, remember_created_at: Time.now) }
......@@ -2008,33 +2032,6 @@ describe User, models: true do
allow(Gitlab::Geo).to receive(:secondary?) { true }
expect { subject.remember_me! }.not_to change(subject, :remember_created_at)
=======
context '#invalidate_issue_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for issue counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_issues_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_issue_cache_counts
end
end
context '#invalidate_merge_request_cache_counts' do
let(:user) { build_stubbed(:user) }
it 'invalidates cache for Merge Request counter' do
cache_mock = double
expect(cache_mock).to receive(:delete).with(['users', user.id, 'assigned_open_merge_requests_count'])
allow(Rails).to receive(:cache).and_return(cache_mock)
user.invalidate_merge_request_cache_counts
>>>>>>> upstream/master
end
end
end
......@@ -36,12 +36,8 @@ module KubernetesHelpers
{
"kind" => "APIResourceList",
"resources" => [
<<<<<<< HEAD
{ "name" => "pods", "namespaced" => true, "kind" => "Pod" },
{ "name" => "deployments", "namespaced" => true, "kind" => "Deployment" }
=======
{ "name" => "pods", "namespaced" => true, "kind" => "Pod" }
>>>>>>> upstream/master
]
}
end
......
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