summaryrefslogtreecommitdiff
path: root/app/services/issuable_base_service.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 18:09:00 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-10 18:09:00 +0000
commitc57e10faab0abb213e7a18274fd5a98ba87a5c09 (patch)
treede0195e28dfe19fbfeb5bffa8fde4f511288d8ef /app/services/issuable_base_service.rb
parent11e5d1b9ca3efa7be34ddebb708a6aedb4e91639 (diff)
downloadgitlab-ce-c57e10faab0abb213e7a18274fd5a98ba87a5c09.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/services/issuable_base_service.rb')
-rw-r--r--app/services/issuable_base_service.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/app/services/issuable_base_service.rb b/app/services/issuable_base_service.rb
index 6cb84458d9b..b59bb803778 100644
--- a/app/services/issuable_base_service.rb
+++ b/app/services/issuable_base_service.rb
@@ -11,10 +11,14 @@ class IssuableBaseService < BaseService
@skip_milestone_email = @params.delete(:skip_milestone_email)
end
- def filter_params(issuable)
+ def can_admin_issuable?(issuable)
ability_name = :"admin_#{issuable.to_ability_name}"
- unless can?(current_user, ability_name, issuable)
+ can?(current_user, ability_name, issuable)
+ end
+
+ def filter_params(issuable)
+ unless can_admin_issuable?(issuable)
params.delete(:milestone_id)
params.delete(:labels)
params.delete(:add_label_ids)