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
Boxiang Sun
gitlab-ce
Commits
57ee993f
Commit
57ee993f
authored
Aug 25, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'improve-abuse-reports-stable' into 7-14-stable
parents
e8329f0d
3052e6f6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
8 deletions
+23
-8
CHANGELOG
CHANGELOG
+1
-0
app/assets/javascripts/application.js.coffee
app/assets/javascripts/application.js.coffee
+6
-0
app/controllers/admin/abuse_reports_controller.rb
app/controllers/admin/abuse_reports_controller.rb
+7
-2
app/views/admin/abuse_reports/_abuse_report.html.haml
app/views/admin/abuse_reports/_abuse_report.html.haml
+8
-5
app/views/admin/abuse_reports/index.html.haml
app/views/admin/abuse_reports/index.html.haml
+1
-1
No files found.
CHANGELOG
View file @
57ee993f
...
@@ -4,6 +4,7 @@ v 7.14.1
...
@@ -4,6 +4,7 @@ v 7.14.1
- Only include base URL in OmniAuth full_host parameter (Stan Hu)
- Only include base URL in OmniAuth full_host parameter (Stan Hu)
- Fix Error 500 in API when accessing a group that has an avatar (Stan Hu)
- Fix Error 500 in API when accessing a group that has an avatar (Stan Hu)
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Fix "Reload with full diff" URL button in compare branch view (Stan Hu)
- Improve abuse reports management from admin area
v 7.14.0
v 7.14.0
- Fix bug where non-project members of the target project could set labels on new merge requests.
- Fix bug where non-project members of the target project could set labels on new merge requests.
...
...
app/assets/javascripts/application.js.coffee
View file @
57ee993f
...
@@ -116,6 +116,12 @@ $ ->
...
@@ -116,6 +116,12 @@ $ ->
$
(
'.remove-row'
).
bind
'ajax:success'
,
->
$
(
'.remove-row'
).
bind
'ajax:success'
,
->
$
(
this
).
closest
(
'li'
).
fadeOut
()
$
(
this
).
closest
(
'li'
).
fadeOut
()
$
(
'.js-remove-tr'
).
bind
'ajax:before'
,
->
$
(
this
).
hide
()
$
(
'.js-remove-tr'
).
bind
'ajax:success'
,
->
$
(
this
).
closest
(
'tr'
).
fadeOut
()
# Initialize select2 selects
# Initialize select2 selects
$
(
'select.select2'
).
select2
(
width
:
'resolve'
,
dropdownAutoWidth
:
true
)
$
(
'select.select2'
).
select2
(
width
:
'resolve'
,
dropdownAutoWidth
:
true
)
...
...
app/controllers/admin/abuse_reports_controller.rb
View file @
57ee993f
...
@@ -4,8 +4,13 @@ class Admin::AbuseReportsController < Admin::ApplicationController
...
@@ -4,8 +4,13 @@ class Admin::AbuseReportsController < Admin::ApplicationController
end
end
def
destroy
def
destroy
AbuseReport
.
find
(
params
[
:id
]).
destroy
abuse_report
=
AbuseReport
.
find
(
params
[
:id
])
redirect_to
admin_abuse_reports_path
,
notice:
'Report was removed'
if
params
[
:remove_user
]
abuse_report
.
user
.
destroy
end
abuse_report
.
destroy
render
nothing:
true
end
end
end
end
app/views/admin/abuse_reports/_abuse_report.html.haml
View file @
57ee993f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
%tr
%tr
%td
%td
-
if
reporter
-
if
reporter
=
link_to
reporter
.
name
,
[
:admin
,
reporter
]
=
link_to
reporter
.
name
,
reporter
-
else
-
else
(removed)
(removed)
%td
%td
...
@@ -12,12 +12,15 @@
...
@@ -12,12 +12,15 @@
=
abuse_report
.
message
=
abuse_report
.
message
%td
%td
-
if
user
-
if
user
=
link_to
user
.
name
,
[
:admin
,
user
]
=
link_to
user
.
name
,
user
-
else
-
else
(removed)
(removed)
%td
%td
-
if
user
-
if
user
=
link_to
'Block'
,
block_admin_user_path
(
user
),
data:
{
confirm:
'USER WILL BE BLOCKED! Are you sure?'
},
method: :put
,
class:
"btn btn-xs btn-warning"
=
link_to
'Remove user & report'
,
admin_abuse_report_path
(
abuse_report
,
remove_user:
true
),
=
link_to
'Remove user'
,
[
:admin
,
user
],
data:
{
confirm:
"USER
#{
user
.
name
}
WILL BE REMOVED! Are you sure?"
},
method: :delete
,
class:
"btn btn-xs btn-remove"
data:
{
confirm:
"USER
#{
user
.
name
}
WILL BE REMOVED! Are you sure?"
},
remote:
true
,
method: :delete
,
class:
"btn btn-xs btn-remove js-remove-tr"
%td
%td
=
link_to
'Remove report'
,
[
:admin
,
abuse_report
],
method: :delete
,
class:
"btn btn-xs btn-close"
-
if
user
=
link_to
'Block user'
,
block_admin_user_path
(
user
),
data:
{
confirm:
'USER WILL BE BLOCKED! Are you sure?'
},
method: :put
,
class:
"btn btn-xs"
=
link_to
'Remove report'
,
[
:admin
,
abuse_report
],
remote:
true
,
method: :delete
,
class:
"btn btn-xs btn-close js-remove-tr"
app/views/admin/abuse_reports/index.html.haml
View file @
57ee993f
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
%th
Reported at
%th
Reported at
%th
Message
%th
Message
%th
User
%th
User
%th
%th
Primary action
%th
%th
=
render
@abuse_reports
=
render
@abuse_reports
=
paginate
@abuse_reports
=
paginate
@abuse_reports
...
...
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