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
e7557619
Commit
e7557619
authored
Jun 26, 2020
by
syasonik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expose correct permission for alert management
parent
8e1be747
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/helpers/projects/alert_management_helper.rb
app/helpers/projects/alert_management_helper.rb
+1
-1
spec/helpers/projects/alert_management_helper_spec.rb
spec/helpers/projects/alert_management_helper_spec.rb
+1
-1
No files found.
app/helpers/projects/alert_management_helper.rb
View file @
e7557619
...
...
@@ -7,7 +7,7 @@ module Projects::AlertManagementHelper
'enable-alert-management-path'
=>
edit_project_service_path
(
project
,
AlertsService
),
'populating-alerts-help-url'
=>
help_page_url
(
'user/project/operations/alert_management.html'
,
anchor:
'enable-alert-management'
),
'empty-alert-svg-path'
=>
image_path
(
'illustrations/alert-management-empty-state.svg'
),
'user-can-enable-alert-management'
=>
can?
(
current_user
,
:admin_
project
,
project
).
to_s
,
'user-can-enable-alert-management'
=>
can?
(
current_user
,
:admin_
operations
,
project
).
to_s
,
'alert-management-enabled'
=>
alert_management_enabled?
(
project
).
to_s
}
end
...
...
spec/helpers/projects/alert_management_helper_spec.rb
View file @
e7557619
...
...
@@ -19,7 +19,7 @@ RSpec.describe Projects::AlertManagementHelper do
before
do
allow
(
helper
)
.
to
receive
(
:can?
)
.
with
(
current_user
,
:admin_
project
,
project
)
.
with
(
current_user
,
:admin_
operations
,
project
)
.
and_return
(
user_can_enable_alert_management
)
end
...
...
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