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
7ee732ac
Commit
7ee732ac
authored
Sep 04, 2019
by
Vitali Tatarintev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify project_without_auth method
parent
a5a2a97a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
12 deletions
+4
-12
ee/app/controllers/projects/alerting/notifications_controller.rb
...controllers/projects/alerting/notifications_controller.rb
+2
-6
ee/app/controllers/projects/prometheus/alerts_controller.rb
ee/app/controllers/projects/prometheus/alerts_controller.rb
+2
-6
No files found.
ee/app/controllers/projects/alerting/notifications_controller.rb
View file @
7ee732ac
...
...
@@ -17,12 +17,8 @@ module Projects
private
def
project_without_auth
return
@project
if
@project
namespace
=
params
[
:namespace_id
]
id
=
params
[
:project_id
]
@project
=
Project
.
find_by_full_path
(
"
#{
namespace
}
/
#{
id
}
"
)
@project
||=
Project
.
find_by_full_path
(
"
#{
params
[
:namespace_id
]
}
/
#{
params
[
:project_id
]
}
"
)
end
def
check_generic_alert_endpoint_feature_flag!
...
...
ee/app/controllers/projects/prometheus/alerts_controller.rb
View file @
7ee732ac
...
...
@@ -127,12 +127,8 @@ module Projects
end
def
project_without_auth
return
@project
if
@project
namespace
=
params
[
:namespace_id
]
id
=
params
[
:project_id
]
@project
=
Project
.
find_by_full_path
(
"
#{
namespace
}
/
#{
id
}
"
)
@project
||=
Project
.
find_by_full_path
(
"
#{
params
[
:namespace_id
]
}
/
#{
params
[
:project_id
]
}
"
)
end
def
prometheus_alerts
...
...
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