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
7fc54bf1
Commit
7fc54bf1
authored
Mar 17, 2021
by
Małgorzata Ksionek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move load_recaptcha method
parent
3874239b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
1 deletion
+3
-1
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+3
-1
No files found.
app/controllers/groups_controller.rb
View file @
7fc54bf1
...
...
@@ -24,7 +24,7 @@ class GroupsController < Groups::ApplicationController
# Authorize
before_action
:authorize_admin_group!
,
only:
[
:edit
,
:update
,
:destroy
,
:projects
,
:transfer
,
:export
,
:download_export
]
before_action
:authorize_create_group!
,
only:
[
:new
]
before_action
:load_recaptcha
,
only:
[
:new
,
:create
],
if:
->
{
captcha_required?
}
before_action
:load_recaptcha
,
only:
[
:new
],
if:
->
{
captcha_required?
}
before_action
:group_projects
,
only:
[
:projects
,
:activity
,
:issues
,
:merge_requests
]
before_action
:event_filter
,
only:
[
:activity
]
...
...
@@ -331,6 +331,8 @@ class GroupsController < Groups::ApplicationController
def
check_captcha
return
if
group_params
[
:parent_id
].
present?
# Only require for top-level groups
load_recaptcha
return
if
verify_recaptcha
flash
[
:alert
]
=
_
(
'There was an error with the reCAPTCHA. Please solve the reCAPTCHA again.'
)
...
...
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