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