diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 18:09:00 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-10 18:09:00 +0000 |
commit | c57e10faab0abb213e7a18274fd5a98ba87a5c09 (patch) | |
tree | de0195e28dfe19fbfeb5bffa8fde4f511288d8ef /app/services/issuable_base_service.rb | |
parent | 11e5d1b9ca3efa7be34ddebb708a6aedb4e91639 (diff) | |
download | gitlab-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.rb | 8 |
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) |