Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
c63db30f
Commit
c63db30f
authored
Sep 17, 2019
by
Marc Schwede
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed confidential quick action to only be available on non confidential issues
parent
6dceb7bd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
1 deletion
+24
-1
changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml
...ial-quick-action-is-available-for-confidential-issues.yml
+6
-0
lib/gitlab/quick_actions/issue_actions.rb
lib/gitlab/quick_actions/issue_actions.rb
+2
-1
spec/services/quick_actions/interpret_service_spec.rb
spec/services/quick_actions/interpret_service_spec.rb
+16
-0
No files found.
changelogs/unreleased/66330-confidential-quick-action-is-available-for-confidential-issues.yml
0 → 100644
View file @
c63db30f
---
title
:
Changed confidential quick action to only be available on non confidential
issues
merge_request
:
author
:
Marc Schwede
type
:
fixed
lib/gitlab/quick_actions/issue_actions.rb
View file @
c63db30f
...
...
@@ -135,7 +135,8 @@ module Gitlab
end
types
Issue
condition
do
current_user
.
can?
(
:"admin_
#{
quick_action_target
.
to_ability_name
}
"
,
quick_action_target
)
!
quick_action_target
.
confidential?
&&
current_user
.
can?
(
:"admin_
#{
quick_action_target
.
to_ability_name
}
"
,
quick_action_target
)
end
command
:confidential
do
@updates
[
:confidential
]
=
true
...
...
spec/services/quick_actions/interpret_service_spec.rb
View file @
c63db30f
...
...
@@ -586,6 +586,22 @@ describe QuickActions::InterpretService do
expect
(
message
).
to
eq
(
'Made this issue confidential.'
)
end
context
'when issuable is already confidential'
do
before
do
issuable
.
update
(
confidential:
true
)
end
it
'does not return the success message'
do
_
,
_
,
message
=
service
.
execute
(
content
,
issuable
)
expect
(
message
).
to
be_empty
end
it
'is not part of the available commands'
do
expect
(
service
.
available_commands
(
issuable
)).
not_to
include
(
a_hash_including
(
name: :confidential
))
end
end
end
shared_examples
'shrug command'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment