From 4cab66e3e2ca53c2d96a5306b6ae6cd864c5a39d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20Rodr=C3=ADguez?= Date: Mon, 4 Apr 2016 23:37:50 -0300 Subject: Implementing autocomplete for GFM milestone references --- app/controllers/projects_controller.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3768efe142a..8662de712a1 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -147,6 +147,7 @@ class ProjectsController < Projects::ApplicationController @suggestions = { emojis: AwardEmoji.urls, issues: autocomplete.issues, + milestones: autocomplete.milestones, mergerequests: autocomplete.merge_requests, members: participants } -- cgit v1.2.1 From 03b3fe13f6af67f8117cf4322b605630f55f3136 Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 18 Apr 2016 08:23:17 -0400 Subject: Make images_enabled configurable --- app/controllers/projects_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3768efe142a..52f7b993343 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -235,7 +235,8 @@ class ProjectsController < Projects::ApplicationController def project_params params.require(:project).permit( :name, :path, :description, :issues_tracker, :tag_list, :runners_token, - :issues_enabled, :merge_requests_enabled, :snippets_enabled, :issues_tracker_id, :default_branch, + :issues_enabled, :merge_requests_enabled, :snippets_enabled, :images_enabled, + :issues_tracker_id, :default_branch, :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, :public_builds, -- cgit v1.2.1 From 3bdc57f0a710b3769381ecad7ea4098223ecff56 Mon Sep 17 00:00:00 2001 From: Zeger-Jan van de Weg Date: Sat, 16 Apr 2016 21:09:08 +0200 Subject: Create table for award emoji --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3768efe142a..85a987c2cb2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -145,7 +145,7 @@ class ProjectsController < Projects::ApplicationController participants = ::Projects::ParticipantsService.new(@project, current_user).execute(note_type, note_id) @suggestions = { - emojis: AwardEmoji.urls, + emojis: Gitlab::AwardEmoji.urls, issues: autocomplete.issues, mergerequests: autocomplete.merge_requests, members: participants -- cgit v1.2.1 From 0094d8f19644152a66b9d21b8cd86f797199311f Mon Sep 17 00:00:00 2001 From: Kamil Trzcinski Date: Mon, 9 May 2016 20:29:57 +0300 Subject: Rename `images` to `container_registry` --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 52f7b993343..f4ec60ad2c7 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -235,7 +235,7 @@ class ProjectsController < Projects::ApplicationController def project_params params.require(:project).permit( :name, :path, :description, :issues_tracker, :tag_list, :runners_token, - :issues_enabled, :merge_requests_enabled, :snippets_enabled, :images_enabled, + :issues_enabled, :merge_requests_enabled, :snippets_enabled, :container_registry_enabled, :issues_tracker_id, :default_branch, :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, -- cgit v1.2.1 From 07ff874f572a947d7730787492a604dd3f44d496 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 29 Apr 2016 18:06:22 -0300 Subject: Let users set notification levels in projects which they are not members --- app/controllers/projects_controller.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index f4ec60ad2c7..55632308b4f 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -102,9 +102,7 @@ class ProjectsController < Projects::ApplicationController respond_to do |format| format.html do if current_user - @membership = @project.team.find_member(current_user.id) - - if @membership + if can?(current_user, :read_project, @project) @notification_setting = current_user.notification_settings_for(@project) end end -- cgit v1.2.1 From c2c7014e017a36e2819335653f5d3fc04cc2c054 Mon Sep 17 00:00:00 2001 From: Felipe Artur Date: Fri, 6 May 2016 16:40:27 -0300 Subject: Improve documentation and add changelog --- app/controllers/projects_controller.rb | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 55632308b4f..6d2b6b60f13 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -101,11 +101,7 @@ class ProjectsController < Projects::ApplicationController respond_to do |format| format.html do - if current_user - if can?(current_user, :read_project, @project) - @notification_setting = current_user.notification_settings_for(@project) - end - end + @notification_setting = current_user.notification_settings_for(@project) if current_user if @project.repository_exists? if @project.empty_repo? -- cgit v1.2.1 From 86166d28029d5fcc729f7b7f5a41635c2e783a9e Mon Sep 17 00:00:00 2001 From: Yorick Peterse Date: Thu, 26 May 2016 13:16:43 +0200 Subject: Split Markdown rendering & reference gathering This splits the Markdown rendering and reference extraction phases into two distinct code bases. The reference extraction phase no longer relies on the html-pipeline Gem (and any related code) and allows for extracting of references from multiple HTML nodes in a single pass. This means that if you want to extract user references from 200 comments you no longer need to run 200 times N number of queries, instead only a handful of queries may be needed. --- app/controllers/projects_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 9697b88c032..f94e2a84fa2 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -197,8 +197,8 @@ class ProjectsController < Projects::ApplicationController def markdown_preview text = params[:text] - ext = Gitlab::ReferenceExtractor.new(@project, current_user, current_user) - ext.analyze(text) + ext = Gitlab::ReferenceExtractor.new(@project, current_user) + ext.analyze(text, author: current_user) render json: { body: view_context.markdown(text), -- cgit v1.2.1 From 07dbd6b3884c4f188b2c3f29dd7419791f1051eb Mon Sep 17 00:00:00 2001 From: Rui Anderson Date: Wed, 27 Apr 2016 15:34:42 -0300 Subject: Allow or not merge MR with failed build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- app/controllers/projects_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/projects_controller.rb') diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 3af62c7696c..a6479c42d94 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -234,7 +234,7 @@ class ProjectsController < Projects::ApplicationController :issues_tracker_id, :default_branch, :wiki_enabled, :visibility_level, :import_url, :last_activity_at, :namespace_id, :avatar, :builds_enabled, :build_allow_git_fetch, :build_timeout_in_minutes, :build_coverage_regex, - :public_builds, + :public_builds, :only_allow_merge_if_build_succeeds ) end -- cgit v1.2.1