Commit af5ea92c authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'master' into login_page

Conflicts:
	CHANGELOG
parents aea3712e 38ae34a3
...@@ -11,6 +11,7 @@ v 6.8.0 ...@@ -11,6 +11,7 @@ v 6.8.0
- Fix popen bug in `rake gitlab:satellites:create` - Fix popen bug in `rake gitlab:satellites:create`
- Disable connection reaping for MySQL - Disable connection reaping for MySQL
- Allow oauth signup without email for twitter and github - Allow oauth signup without email for twitter and github
- Fix faulty namespace names that caused 500 on user creation
- Option to disable standard login - Option to disable standard login
v 6.7.3 v 6.7.3
......
web: bundle exec unicorn_rails -p $PORT -E development -c config/unicorn_development.rb web: bundle exec unicorn_rails -p ${PORT} -E ${RAILS_ENV} -c ${UNICORN_CONFIG:="config/unicorn.rb"}
worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell worker: bundle exec sidekiq -q post_receive,mailer,system_hook,project_web_hook,common,default,gitlab_shell
...@@ -216,7 +216,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -216,7 +216,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end end
def allowed_to_merge? def allowed_to_merge?
allowed_to_push_code?(project) allowed_to_push_code?(project, @merge_request.target_branch)
end end
def invalid_mr def invalid_mr
...@@ -225,17 +225,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -225,17 +225,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController
end end
def allowed_to_remove_source_branch? def allowed_to_remove_source_branch?
allowed_to_push_code?(@merge_request.source_project) && allowed_to_push_code?(@merge_request.source_project, @merge_request.source_branch) &&
!@merge_request.disallow_source_branch_removal? !@merge_request.disallow_source_branch_removal?
end end
def allowed_to_push_code?(project) def allowed_to_push_code?(project, branch)
action = if project.protected_branch?(@merge_request.target_branch) action = if project.protected_branch?(branch)
:push_code_to_protected_branches :push_code_to_protected_branches
else else
:push_code :push_code
end end
can?(current_user, action, @project) can?(current_user, action, project)
end end
end end
...@@ -210,7 +210,7 @@ class MergeRequest < ActiveRecord::Base ...@@ -210,7 +210,7 @@ class MergeRequest < ActiveRecord::Base
end end
def disallow_source_branch_removal? def disallow_source_branch_removal?
(source_project.root_ref? source_branch) || for_fork? source_project.root_ref?(source_branch) || source_project.protected_branches.include?(source_branch)
end end
def project def project
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
- if providers.present? - if providers.present?
%hr %hr
%div{:'data-no-turbolink' => 'data-no-turbolink'} %div{:'data-no-turbolink' => 'data-no-turbolink'}
%span Sign in with*: &nbsp; %span Sign in with: &nbsp;
- providers.each do |provider| - providers.each do |provider|
%span %span
- if default_providers.include?(provider) - if default_providers.include?(provider)
......
- note = discussion_notes.first - note = discussion_notes.first
.discussion.js-details-container.js-toggler-container.open{ class: note.discussion_id } .discussion.js-toggle-container{ class: note.discussion_id }
.discussion-header .discussion-header
.discussion-actions .discussion-actions
= link_to "javascript:;", class: "js-details-target turn-on js-toggler-target" do = link_to "#", class: "js-toggle-button" do
%i.icon-eye-close %i.icon-chevron-up
Hide discussion Show/hide discussion
= link_to "javascript:;", class: "js-details-target turn-off js-toggler-target" do
%i.icon-eye-open
Show discussion
= image_tag avatar_icon(note.author_email), class: "avatar s32" = image_tag avatar_icon(note.author_email), class: "avatar s32"
%div %div
= link_to_member(@project, note.author, avatar: false) = link_to_member(@project, note.author, avatar: false)
...@@ -33,7 +30,7 @@ ...@@ -33,7 +30,7 @@
= link_to_member(@project, last_note.author, avatar: false) = link_to_member(@project, last_note.author, avatar: false)
%span.discussion-last-update %span.discussion-last-update
#{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')} #{time_ago_with_tooltip(last_note.updated_at, 'bottom', 'discussion_updated_ago')}
.discussion-body .discussion-body.js-toggle-content
- if note.for_diff_line? - if note.for_diff_line?
- if note.active? - if note.active?
= render "projects/notes/discussion_diff", discussion_notes: discussion_notes, note: note = render "projects/notes/discussion_diff", discussion_notes: discussion_notes, note: note
...@@ -47,11 +44,3 @@ ...@@ -47,11 +44,3 @@
.notes{ rel: discussion_notes.first.discussion_id } .notes{ rel: discussion_notes.first.discussion_id }
= render discussion_notes = render discussion_notes
= render "projects/notes/discussion_reply_button", note: discussion_notes.first = render "projects/notes/discussion_reply_button", note: discussion_notes.first
-# will be shown when the other one is hidden
.discussion-hidden.content.hide
.note
%em Hidden discussion.
= link_to "javascript:;", class: "js-details-target js-toggler-target" do
%i.icon-eye-open
Show
class FixNamespaces < ActiveRecord::Migration
def up
Namespace.where('name <> path and type is null').each do |namespace|
namespace.update_attribute(:name, namespace.path)
end
end
def down
end
end
\ No newline at end of file
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20140313092127) do ActiveRecord::Schema.define(version: 20140407135544) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
......
...@@ -42,6 +42,10 @@ server { ...@@ -42,6 +42,10 @@ server {
# if a file, which is not found in the root folder is requested, # if a file, which is not found in the root folder is requested,
# then the proxy pass the request to the upsteam (gitlab unicorn) # then the proxy pass the request to the upsteam (gitlab unicorn)
location @gitlab { location @gitlab {
# If you use https make sure you disable gzip compression
# to be safe against BREACH attack
# gzip off;
proxy_read_timeout 300; # Some requests take more than 30 seconds. proxy_read_timeout 300; # Some requests take more than 30 seconds.
proxy_connect_timeout 300; # Some requests take more than 30 seconds. proxy_connect_timeout 300; # Some requests take more than 30 seconds.
proxy_redirect off; proxy_redirect off;
...@@ -63,5 +67,4 @@ server { ...@@ -63,5 +67,4 @@ server {
} }
error_page 502 /502.html; error_page 502 /502.html;
} }
\ No newline at end of file
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