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
0
Merge Requests
0
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
Léo-Paul Géneau
gitlab-ce
Commits
0e935c76
Commit
0e935c76
authored
Dec 08, 2017
by
Luke Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add recaptcha_check_if_spammable for issualbes than arent spammables
parent
2a181d68
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
app/controllers/concerns/issuable_actions.rb
app/controllers/concerns/issuable_actions.rb
+8
-2
No files found.
app/controllers/concerns/issuable_actions.rb
View file @
0e935c76
...
...
@@ -21,11 +21,11 @@ module IssuableActions
respond_to
do
|
format
|
format
.
html
do
recaptcha_check_
with_fallback
{
render
:edit
}
recaptcha_check_
if_spammable
{
render
:edit
}
end
format
.
json
do
recaptcha_check_
with_fallback
(
false
)
{
render_entity_json
}
recaptcha_check_
if_spammable
(
false
)
{
render_entity_json
}
end
end
...
...
@@ -80,6 +80,12 @@ module IssuableActions
private
def
recaptcha_check_if_spammable
(
should_redirect
=
true
,
&
block
)
return
yield
unless
@issuable
.
is_a?
Spammable
recaptcha_check_with_fallback
(
should_redirect
,
&
block
)
end
def
render_conflict_response
respond_to
do
|
format
|
format
.
html
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