diff options
author | Jan <king-jan1999@hotmail.de> | 2018-06-13 15:42:36 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-06-13 15:42:36 +0300 |
commit | 5ba9279c5039615fd797beab273f3c1aeb642dd0 (patch) | |
tree | 7a8ccb1e15d496c981331b64f6e5165a04bb8ab8 /app/services/quick_actions | |
parent | 031ee142b1cd941eb10afd11db553173a60428f3 (diff) |
Resolve "Add `/confidential` quick action for issues"
Diffstat (limited to 'app/services/quick_actions')
-rw-r--r-- | app/services/quick_actions/interpret_service.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index 0215994b1a7..9ac8fdb4cff 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -561,6 +561,17 @@ module QuickActions end end + desc 'Make issue confidential.' + explanation do + 'Makes this issue confidential' + end + condition do + issuable.is_a?(Issue) && current_user.can?(:"admin_#{issuable.to_ability_name}", issuable) + end + command :confidential do + @updates[:confidential] = true + end + def extract_users(params) return [] if params.nil? |