Commit eec93f8a authored by Alejandro Rodríguez's avatar Alejandro Rodríguez

Fix conflicts after CE upstream update

parent 69373a0f
......@@ -78,14 +78,9 @@ entry.
## 8.13.6 (2016-11-17)
<<<<<<< HEAD
- No changes.
- Omniauth auto link LDAP user falls back to find by DN when user cannot be found by UID. !7002
=======
- Omniauth auto link LDAP user falls back to find by DN when user cannot be found by UID. !7002
- Fix Milestone dropdown not stay selected for `Upcoming` and `No Milestone` option. !7117
- Fix relative links in Markdown wiki when displayed in "Project" tab. !7218
>>>>>>> ce/master
- Fix no "Register" tab if ldap auth is enabled (#24038). !7274 (Luc Didry)
- Fix cache for commit status in commits list to respect branches. !7372
- Fix issue causing Labels not to appear in sidebar on MR page. !7416 (Alex Sanford)
......
......@@ -928,11 +928,7 @@ DEPENDENCIES
minitest (~> 5.7.0)
mousetrap-rails (~> 1.4.6)
mysql2 (~> 0.3.16)
<<<<<<< HEAD
nested_form (~> 0.3.2)
net-ldap
=======
>>>>>>> ce/master
net-ssh (~> 3.0.1)
newrelic_rpm (~> 3.16)
nokogiri (~> 1.6.7, >= 1.6.7.2)
......
......@@ -90,14 +90,9 @@ $table-border-color: #f0f0f0;
$background-color: $gray-light;
$dark-background-color: #f5f5f5;
$table-text-gray: #8f8f8f;
<<<<<<< HEAD
$widget-expand-item: #e8f2f7;
$widget-inner-border: #eef0f2;
$sidebar-collapsed-icon-color: #999;
=======
$well-expand-item: #e8f2f7;
$well-inner-border: #eef0f2;
>>>>>>> ce/master
/*
* Text
......
......@@ -225,12 +225,11 @@ class Group < Namespace
SystemHooksService.new
end
<<<<<<< HEAD
def first_non_empty_project
projects.detect{ |project| !project.empty_repo? }
=======
end
def refresh_members_authorized_projects
UserProjectAccessChangedService.new(users.pluck(:id)).execute
>>>>>>> ce/master
end
end
......@@ -70,12 +70,8 @@ class Project < ActiveRecord::Base
has_one :push_rule, dependent: :destroy
has_one :last_event, -> {order 'events.created_at DESC'}, class_name: 'Event'
<<<<<<< HEAD
has_many :boards, dependent: :destroy
=======
has_many :boards, before_add: :validate_board_limit, dependent: :destroy
has_many :chat_services
>>>>>>> ce/master
# Project services
has_one :campfire_service, dependent: :destroy
......@@ -1572,7 +1568,6 @@ class Project < ActiveRecord::Base
Gitlab::Redis.with { |redis| redis.del(pushes_since_gc_redis_key) }
end
<<<<<<< HEAD
def repository_and_lfs_size
repository_size + lfs_objects.sum(:size).to_i.to_mb
end
......@@ -1601,13 +1596,8 @@ class Project < ActiveRecord::Base
size_limit_enabled? && (size_mb > actual_size_limit || size_mb + repository_and_lfs_size > actual_size_limit)
end
def environments_for(ref, commit, with_tags: false)
environment_ids = deployments.group(:environment_id).
select(:environment_id)
=======
def environments_for(ref, commit: nil, with_tags: false)
deployments_query = with_tags ? 'ref = ? OR tag IS TRUE' : 'ref = ?'
>>>>>>> ce/master
environment_ids = deployments
.where(deployments_query, ref.to_s)
......@@ -1640,15 +1630,4 @@ class Project < ActiveRecord::Base
current_application_settings.default_branch_protection == Gitlab::Access::PROTECTION_FULL ||
current_application_settings.default_branch_protection == Gitlab::Access::PROTECTION_DEV_CAN_MERGE
end
# Similar to the normal callbacks that hook into the life cycle of an
# Active Record object, you can also define callbacks that get triggered
# when you add an object to an association collection. If any of these
# callbacks throw an exception, the object will not be added to the
# collection. Before you add a new board to the boards collection if you
# already have 1, 2, or n it will fail, but it if you have 0 that is lower
# than the number of permitted boards per project it won't fail.
def validate_board_limit(board)
raise BoardLimitExceeded, 'Number of permitted boards exceeded' if boards.size >= NUMBER_OF_PERMITTED_BOARDS
end
end
......@@ -16,12 +16,9 @@ class ProjectGroupLink < ActiveRecord::Base
validates :group_access, inclusion: { in: Gitlab::Access.values }, presence: true
validate :different_group
<<<<<<< HEAD
before_destroy :delete_branch_protection
=======
after_create :refresh_group_members_authorized_projects
after_destroy :refresh_group_members_authorized_projects
>>>>>>> ce/master
def self.access_options
Gitlab::Access.options
......@@ -43,15 +40,14 @@ class ProjectGroupLink < ActiveRecord::Base
end
end
<<<<<<< HEAD
def delete_branch_protection
if group.present? && project.present?
project.protected_branches.merge_access_by_group(group).destroy_all
project.protected_branches.push_access_by_group(group).destroy_all
end
=======
end
def refresh_group_members_authorized_projects
group.refresh_members_authorized_projects
>>>>>>> ce/master
end
end
......@@ -71,15 +71,10 @@ class User < ActiveRecord::Base
has_many :project_members, -> { where(requested_at: nil) }, dependent: :destroy
has_many :projects, through: :project_members
has_many :created_projects, foreign_key: :creator_id, class_name: 'Project'
<<<<<<< HEAD
has_many :users_star_projects, dependent: :destroy
has_many :starred_projects, through: :users_star_projects, source: :project
=======
has_many :users_star_projects, dependent: :destroy
has_many :starred_projects, through: :users_star_projects, source: :project
has_many :project_authorizations, dependent: :destroy
has_many :authorized_projects, through: :project_authorizations, source: :project
>>>>>>> ce/master
has_many :snippets, dependent: :destroy, foreign_key: :author_id
has_many :issues, dependent: :destroy, foreign_key: :author_id
......
......@@ -49,18 +49,11 @@ class GitPushService < BaseService
update_gitattributes if is_default_branch?
end
<<<<<<< HEAD
if current_application_settings.elasticsearch_indexing? && is_default_branch?
ElasticCommitIndexerWorker.perform_async(@project.id, params[:oldrev], params[:newrev])
end
# Update merge requests that may be affected by this push. A new branch
# could cause the last commit of a merge request to change.
update_merge_requests
=======
execute_related_hooks
>>>>>>> ce/master
perform_housekeeping
end
......@@ -70,18 +63,13 @@ class GitPushService < BaseService
protected
<<<<<<< HEAD
def update_merge_requests
UpdateMergeRequestsWorker.perform_async(@project.id, current_user.id, params[:oldrev], params[:newrev], params[:ref])
mirror_update = @project.mirror? && @project.repository.up_to_date_with_upstream?(branch_name)
=======
def execute_related_hooks
# Update merge requests that may be affected by this push. A new branch
# could cause the last commit of a merge request to change.
#
UpdateMergeRequestsWorker
.perform_async(@project.id, current_user.id, params[:oldrev], params[:newrev], params[:ref])
>>>>>>> ce/master
mirror_update = @project.mirror? && @project.repository.up_to_date_with_upstream?(branch_name)
EventCreateService.new.push(@project, current_user, build_push_data)
@project.execute_hooks(build_push_data.dup, :push_hooks)
......
......@@ -107,16 +107,14 @@ module Projects
@project.team << [current_user, :master, current_user]
end
<<<<<<< HEAD
predefined_push_rule = PushRule.find_by(is_sample: true)
if predefined_push_rule
push_rule = predefined_push_rule.dup.tap{ |gh| gh.is_sample = false }
project.push_rule = push_rule
end
=======
@project.group.refresh_members_authorized_projects if @project.group
>>>>>>> ce/master
end
def skip_wiki?
......
......@@ -41,8 +41,6 @@ scope(path: 'groups/:group_id', module: :groups, as: :group) do
resource :avatar, only: [:destroy]
resources :milestones, constraints: { id: /[^\/]+/ }, only: [:index, :show, :update, :new, :create]
<<<<<<< HEAD
resources :labels, except: [:show], constraints: { id: /\d+/ }
## EE-specific
resource :notification_setting, only: [:update]
......@@ -56,12 +54,10 @@ scope(path: 'groups/:group_id', module: :groups, as: :group) do
end
end
## EE-specific
=======
resources :labels, except: [:show], constraints: { id: /\d+/ } do
post :toggle_subscription, on: :member
end
>>>>>>> ce/master
end
# Must be last route in this file
......
......@@ -1484,22 +1484,16 @@ ActiveRecord::Schema.define(version: 20161117114805) do
add_foreign_key "path_locks", "projects"
add_foreign_key "path_locks", "users"
add_foreign_key "personal_access_tokens", "users"
<<<<<<< HEAD
add_foreign_key "protected_branch_merge_access_levels", "namespaces", column: "group_id"
=======
add_foreign_key "project_authorizations", "projects", on_delete: :cascade
add_foreign_key "project_authorizations", "users", on_delete: :cascade
>>>>>>> ce/master
add_foreign_key "protected_branch_merge_access_levels", "protected_branches"
add_foreign_key "protected_branch_merge_access_levels", "users"
add_foreign_key "protected_branch_push_access_levels", "namespaces", column: "group_id"
add_foreign_key "protected_branch_push_access_levels", "protected_branches"
<<<<<<< HEAD
add_foreign_key "protected_branch_push_access_levels", "users"
add_foreign_key "remote_mirrors", "projects"
=======
add_foreign_key "subscriptions", "projects", on_delete: :cascade
>>>>>>> ce/master
add_foreign_key "trending_projects", "projects", on_delete: :cascade
add_foreign_key "u2f_registrations", "users"
add_foreign_key "user_activities", "users", on_delete: :cascade
......
......@@ -59,12 +59,8 @@ The following table depicts the various user permission levels in a project.
| Manage runners | | | | ✓ | ✓ |
| Manage build triggers | | | | ✓ | ✓ |
| Manage variables | | | | ✓ | ✓ |
<<<<<<< HEAD
| Manage pages | | | | ✓ | ✓ |
| Manage pages domains and certificates | | | | ✓ | ✓ |
| Delete environments | | | | ✓ | ✓ |
=======
>>>>>>> ce/master
| Switch visibility level | | | | | ✓ |
| Transfer project to another namespace | | | | | ✓ |
| Remove project | | | | | ✓ |
......
......@@ -211,9 +211,6 @@ award_emoji:
- user
priorities:
- label
<<<<<<< HEAD
timelogs:
- trackable
- user
=======
>>>>>>> ce/master
......@@ -2,7 +2,7 @@ require 'rails_helper'
describe MergeRequests::ApprovalService, services: true do
describe '#execute' do
let(:user) { build_stubbed(:user) }
let(:user) { create(:user) }
let(:merge_request) { build_stubbed(:merge_request) }
let(:project) { merge_request.project }
let!(:todo) { create(:todo, user: user, project: project, target: merge_request) }
......
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