Commit 807e4ad3 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Resolve conflicts

parent 5f560438
......@@ -1048,11 +1048,8 @@ DEPENDENCIES
minitest (~> 5.7.0)
mousetrap-rails (~> 1.4.6)
mysql2 (~> 0.4.5)
<<<<<<< HEAD
net-ldap
net-ntp
=======
>>>>>>> upstream/master
nokogiri (~> 1.6.7, >= 1.6.7.2)
oauth2 (~> 1.4)
octokit (~> 4.6.2)
......
......@@ -35,15 +35,9 @@ class MergeRequest < ActiveRecord::Base
after_create :ensure_merge_request_diff, unless: :importing?
after_update :reload_diff_if_branch_changed
<<<<<<< HEAD
delegate :commits, :real_size, :commit_shas, :commits_count,
to: :merge_request_diff, prefix: nil
delegate :codeclimate_artifact, to: :head_pipeline, prefix: :head, allow_nil: true
delegate :codeclimate_artifact, to: :base_pipeline, prefix: :base, allow_nil: true
=======
>>>>>>> upstream/master
# When this attribute is true some MR validation is ignored
# It allows us to close or modify broken merge requests
attr_accessor :allow_broken
......
<<<<<<< HEAD
- if license_message.present?
.broadcast-message
= icon('bullhorn')
= license_message
- BroadcastMessage.current.each do |message|
=======
- BroadcastMessage.current&.each do |message|
>>>>>>> upstream/master
= broadcast_message(message)
= render layout: 'projects/protected_branches/shared/protected_branch', locals: { protected_branch: protected_branch } do
<<<<<<< HEAD
= render partial: 'projects/protected_branches/ee/fallback_update_protected_branch', locals: { protected_branch: protected_branch }
=======
= render partial: 'projects/protected_branches/update_protected_branch', locals: { protected_branch: protected_branch }
>>>>>>> upstream/master
= f.hidden_field(:name)
= dropdown_tag('Select branch or create wildcard',
options: { toggle_class: 'js-protected-branch-select js-filter-submit wide git-revision-dropdown-toggle',
filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown", placeholder: "Search protected branches",
footer_content: true,
data: { show_no: true, show_any: true, show_upcoming: true,
selected: params[:protected_branch_name],
project_id: @project.try(:id) } }) do
%ul.dropdown-footer-list
%li
%button{ class: "create-new-protected-branch-button js-create-new-protected-branch", title: "New Protected Branch" }
Create wildcard
%code
= render layout: 'projects/protected_tags/shared/protected_tag', locals: { protected_tag: protected_tag } do
<<<<<<< HEAD
= render partial: 'projects/protected_tags/ee/fallback_update_protected_tag', locals: { protected_tag: protected_tag }
=======
= render partial: 'projects/protected_tags/update_protected_tag', locals: { protected_tag: protected_tag }
>>>>>>> upstream/master
......@@ -6,17 +6,13 @@
= page_specific_javascript_bundle_tag('common_vue')
= page_specific_javascript_bundle_tag('deploy_keys')
<<<<<<< HEAD
= render "projects/push_rules/index"
= render "projects/mirrors/show"
=======
>>>>>>> upstream/master
-# Protected branches & tags use a lot of nested partials.
-# The shared parts of the views can be found in the `shared` directory.
-# Those are used throughout the actual views. These `shared` views are then
-# reused in EE.
<<<<<<< HEAD
- if @project.feature_available?(:protected_refs_for_users, current_user)
= render "projects/protected_branches/ee/index"
= render "projects/protected_tags/ee/index"
......@@ -24,8 +20,4 @@
= render "projects/protected_branches/index"
= render "projects/protected_tags/index"
=======
= render "projects/protected_branches/index"
= render "projects/protected_tags/index"
>>>>>>> upstream/master
= render @deploy_keys
......@@ -46,39 +46,6 @@ module API
expose :awardable_id, :awardable_type
end
class ApplicationSetting < Grape::Entity
expose :id
expose :default_projects_limit
expose :signup_enabled
expose :signin_enabled
expose :gravatar_enabled
expose :sign_in_text
expose :after_sign_up_text
expose :created_at
expose :updated_at
expose :home_page_url
expose :default_branch_protection
expose :restricted_visibility_levels
expose :max_attachment_size
expose :session_expire_delay
expose :default_project_visibility
expose :default_snippet_visibility
expose :default_group_visibility
expose :domain_whitelist
expose :domain_blacklist_enabled
expose :domain_blacklist
expose :user_oauth_applications
expose :after_sign_out_path
expose :container_registry_token_expire_delay
expose :repository_storage
expose :repository_storages
expose :koding_enabled
expose :koding_url
expose :plantuml_enabled
expose :plantuml_url
expose :terminal_max_session_time
end
class Project < Grape::Entity
expose :id, :description, :default_branch, :tag_list
expose :public?, as: :public
......
......@@ -2055,7 +2055,28 @@ describe User, models: true do
end
end
<<<<<<< HEAD
describe '#allow_password_authentication?' do
context 'regular user' do
let(:user) { build(:user) }
it 'returns true when sign-in is enabled' do
expect(user.allow_password_authentication?).to be_truthy
end
it 'returns false when sign-in is disabled' do
stub_application_setting(password_authentication_enabled: false)
expect(user.allow_password_authentication?).to be_falsey
end
end
it 'returns false for ldap user' do
user = create(:omniauth_user, provider: 'ldapmain')
expect(user.allow_password_authentication?).to be_falsey
end
end
describe '#forget_me!' do
subject { create(:user, remember_created_at: Time.now) }
......@@ -2085,27 +2106,6 @@ describe User, models: true do
allow(Gitlab::Geo).to receive(:secondary?) { true }
expect { subject.remember_me! }.not_to change(subject, :remember_created_at)
=======
describe '#allow_password_authentication?' do
context 'regular user' do
let(:user) { build(:user) }
it 'returns true when sign-in is enabled' do
expect(user.allow_password_authentication?).to be_truthy
end
it 'returns false when sign-in is disabled' do
stub_application_setting(password_authentication_enabled: false)
expect(user.allow_password_authentication?).to be_falsey
end
end
it 'returns false for ldap user' do
user = create(:omniauth_user, provider: 'ldapmain')
expect(user.allow_password_authentication?).to be_falsey
>>>>>>> upstream/master
end
end
end
......@@ -11,13 +11,9 @@ describe API::Settings, 'Settings' do
expect(response).to have_http_status(200)
expect(json_response).to be_an Hash
expect(json_response['default_projects_limit']).to eq(42)
<<<<<<< HEAD
expect(json_response['signin_enabled']).to be_truthy
expect(json_response['repository_storages']).to eq(['default'])
=======
expect(json_response['password_authentication_enabled']).to be_truthy
expect(json_response['repository_storage']).to eq('default')
>>>>>>> upstream/master
expect(json_response['koding_enabled']).to be_falsey
expect(json_response['koding_url']).to be_nil
expect(json_response['plantuml_enabled']).to be_falsey
......@@ -38,13 +34,8 @@ describe API::Settings, 'Settings' do
it "updates application settings" do
put api("/application/settings", admin),
default_projects_limit: 3,
<<<<<<< HEAD
signin_enabled: false,
repository_storages: ['custom'],
=======
password_authentication_enabled: false,
repository_storage: 'custom',
>>>>>>> upstream/master
koding_enabled: true,
koding_url: 'http://koding.example.com',
plantuml_enabled: true,
......@@ -57,12 +48,8 @@ describe API::Settings, 'Settings' do
help_page_support_url: 'http://example.com/help'
expect(response).to have_http_status(200)
expect(json_response['default_projects_limit']).to eq(3)
<<<<<<< HEAD
expect(json_response['signin_enabled']).to be_falsey
=======
expect(json_response['password_authentication_enabled']).to be_falsey
expect(json_response['repository_storage']).to eq('custom')
>>>>>>> upstream/master
expect(json_response['repository_storages']).to eq(['custom'])
expect(json_response['koding_enabled']).to be_truthy
expect(json_response['koding_url']).to eq('http://koding.example.com')
......
......@@ -59,12 +59,9 @@ RSpec.configure do |config|
config.include ApiHelpers, :api
config.include Gitlab::Routing, type: :routing
config.include MigrationsHelpers, :migration
<<<<<<< HEAD
config.include StubFeatureFlags
config.include EE::LicenseHelpers
config.include Rails.application.routes.url_helpers, type: :routing
=======
config.include StubFeatureFlags
>>>>>>> upstream/master
config.infer_spec_type_from_file_location!
......
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