summaryrefslogtreecommitdiff
path: root/app/controllers/projects_controller.rb
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-06-14 00:56:59 +0300
committerFatih Acet <acetfatih@gmail.com>2016-06-14 00:56:59 +0300
commit046b5735bcef0670efd9dfd9eb4ec6288b83fc01 (patch)
treef811e48e0213b7f9b51061180606dad33f575152 /app/controllers/projects_controller.rb
parent68da2ac9a0fa6f33b46f0bfbc849043605c2d878 (diff)
parent4a8ae77ebac46545fa4811ea60bf53d1e81f10fc (diff)
downloadgitlab-ce-046b5735bcef0670efd9dfd9eb4ec6288b83fc01.tar.gz
Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into add_autocomplete_for_labels
# Conflicts: # app/assets/javascripts/gfm_auto_complete.js.coffee
Diffstat (limited to 'app/controllers/projects_controller.rb')
-rw-r--r--app/controllers/projects_controller.rb20
1 files changed, 8 insertions, 12 deletions
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index 4d7a3bfe642..482c11cf23c 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -101,13 +101,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
- @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?
@@ -145,8 +139,9 @@ 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,
+ milestones: autocomplete.milestones,
mergerequests: autocomplete.merge_requests,
labels: autocomplete.labels,
members: participants
@@ -203,8 +198,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),
@@ -236,10 +231,11 @@ 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, :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,
- :public_builds,
+ :public_builds, :only_allow_merge_if_build_succeeds
)
end