diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-11-02 00:25:35 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-11-02 00:25:35 +0800 |
commit | 80b5ab5df091e7279166184519ed52c2a09d6129 (patch) | |
tree | ec1b5bd7b5e26e87cf319e52f91d04a11f153e40 /app/models/project.rb | |
parent | e036abf3a2f969036a2c4d59441a4d7a068d7ca4 (diff) | |
parent | 16d98f425ced770dea7701f883f64e263d962a01 (diff) | |
download | gitlab-ce-80b5ab5df091e7279166184519ed52c2a09d6129.tar.gz |
Merge remote-tracking branch 'upstream/master' into show-status-from-branch
* upstream/master: (126 commits)
Allow to search for user by secondary email address in the admin interface
Rename :name search parameter to :search_query at /admin/users
Fix project features default values
Add a link to the Issue Boards API in main README
Fix Markdown styling inside reference links
Fix relative links in Markdown wiki when displayed in "Project" tab
Flexbox webkit prefixes
Tests update
Tests update
Changed where merge request link is
New todos blank state
Implement CreateMembers service to make controller thin
Do not show tooltip for active element (!7105)
Update CHANGELOG
Assign local_assigns[:subject] to a variable on the shared label partial
Use select instead of pluck on Project.group_ids
Skip authorization check when searching for labels on IssuableFinder
Use label subject to calculate number of issues/mrs within the group
Remove unnecessary includes(:priorities) on Projects::LabelsController
Add 8.13.2 CHANGELOG entries
...
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/app/models/project.rb b/app/models/project.rb index fbf7012972e..d5512dfaf9c 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -30,6 +30,11 @@ class Project < ActiveRecord::Base default_value_for :container_registry_enabled, gitlab_config_features.container_registry default_value_for(:repository_storage) { current_application_settings.repository_storage } default_value_for(:shared_runners_enabled) { current_application_settings.shared_runners_enabled } + default_value_for :issues_enabled, gitlab_config_features.issues + default_value_for :merge_requests_enabled, gitlab_config_features.merge_requests + default_value_for :builds_enabled, gitlab_config_features.builds + default_value_for :wiki_enabled, gitlab_config_features.wiki + default_value_for :snippets_enabled, gitlab_config_features.snippets after_create :ensure_dir_exist after_create :create_project_feature, unless: :project_feature @@ -390,7 +395,7 @@ class Project < ActiveRecord::Base end def group_ids - joins(:namespace).where(namespaces: { type: 'Group' }).pluck(:namespace_id) + joins(:namespace).where(namespaces: { type: 'Group' }).select(:namespace_id) end end @@ -738,7 +743,7 @@ class Project < ActiveRecord::Base def create_labels Label.templates.each do |label| params = label.attributes.except('id', 'template', 'created_at', 'updated_at') - Labels::FindOrCreateService.new(owner, self, params).execute + Labels::FindOrCreateService.new(nil, self, params).execute(skip_authorization: true) end end |