diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-20 14:34:42 +0000 |
commit | 9f46488805e86b1bc341ea1620b866016c2ce5ed (patch) | |
tree | f9748c7e287041e37d6da49e0a29c9511dc34768 /app/services/issues/build_service.rb | |
parent | dfc92d081ea0332d69c8aca2f0e745cb48ae5e6d (diff) | |
download | gitlab-ce-9f46488805e86b1bc341ea1620b866016c2ce5ed.tar.gz |
Add latest changes from gitlab-org/gitlab@13-0-stable-ee
Diffstat (limited to 'app/services/issues/build_service.rb')
-rw-r--r-- | app/services/issues/build_service.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/app/services/issues/build_service.rb b/app/services/issues/build_service.rb index daef468987e..e62315de5f9 100644 --- a/app/services/issues/build_service.rb +++ b/app/services/issues/build_service.rb @@ -65,15 +65,19 @@ module Issues private def whitelisted_issue_params + base_params = [:title, :description, :confidential] + admin_params = [:milestone_id] + if can?(current_user, :admin_issue, project) - params.slice(:title, :description, :milestone_id) + params.slice(*(base_params + admin_params)) else - params.slice(:title, :description) + params.slice(*base_params) end end def build_issue_params - issue_params_with_info_from_discussions.merge(whitelisted_issue_params) + { author: current_user }.merge(issue_params_with_info_from_discussions) + .merge(whitelisted_issue_params) end end end |