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
cf98a6d5
Commit
cf98a6d5
authored
Jun 29, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Perform feature checks using method-missing in controller.
parent
b68de6c7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
8 deletions
+2
-8
app/controllers/groups/application_controller.rb
app/controllers/groups/application_controller.rb
+1
-1
app/controllers/groups/hooks_controller.rb
app/controllers/groups/hooks_controller.rb
+1
-7
No files found.
app/controllers/groups/application_controller.rb
View file @
cf98a6d5
app/controllers/groups/hooks_controller.rb
View file @
cf98a6d5
...
...
@@ -2,7 +2,7 @@ class Groups::HooksController < Groups::ApplicationController
# Authorize
before_action
:group
before_action
:authorize_admin_group!
before_action
:
ensure_feature
_available!
before_action
:
check_group_webhooks
_available!
respond_to
:html
...
...
@@ -69,10 +69,4 @@ class Groups::HooksController < Groups::ApplicationController
:wiki_page_events
)
end
def
ensure_feature_available!
unless
@group
.
feature_available?
(
:group_webhooks
)
render_404
end
end
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