1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-21 11:27:18 +00:00

Illegal report by react (#3415)

* illegal report

1, add illegal report at shared file page
2, list all illegal reports at admin page

* add ENABLE_SHARE_LINK_REPORT_ILLEGAL setting

* UserRateThrottle -> AnonRateThrottle

* use to_python_boolean

* frontend by React

* remove illegal report dialog in shared dir view

* add migrations dir

* add illegal_reports migrations

* rename illegal to abuse in api

* rename illegal to abuse in test

* rename illegal to abuse in share file view

* rename illegal to abuse in react

* rename illegal to abuse in Backbone

* add enableShareLinkReportAbuse in templates

* add ReportAbuse

* update ReportAbuse

* update ReportAbuse urls

* update ReportAbuse api-js

* sysadmin_react_app.html

* sysadmin.py

* fix

* fix

* fix

* can not abuse own file

* Contact Information is required.

* fix review

* remove repo icon
This commit is contained in:
sniper-py
2019-11-05 17:46:06 +08:00
committed by Daniel Pan
parent d95da0bff1
commit 37b743fe3a
31 changed files with 1114 additions and 43 deletions

View File

@@ -5,7 +5,8 @@ import Logo from '../../components/logo';
import { gettext, siteRoot, isPro, isDefaultAdmin, canViewSystemInfo, canViewStatistic,
canConfigSystem, canManageLibrary, canManageUser, canManageGroup, canViewUserLog,
canViewAdminLog, constanceEnabled, multiTenancy, multiInstitution, sysadminExtraEnabled,
enableGuestInvitation, enableTermsAndConditions, enableFileScan, enableWorkWeixin } from '../../utils/constants';
enableGuestInvitation, enableTermsAndConditions, enableFileScan, enableWorkWeixin,
enableShareLinkReportAbuse } from '../../utils/constants';
const propTypes = {
isSidePanelClosed: PropTypes.bool.isRequired,
@@ -247,6 +248,18 @@ class SidePanel extends React.Component {
</Link>
</li>
}
{isDefaultAdmin && enableShareLinkReportAbuse &&
<li className="nav-item">
<Link
className={`nav-link ellipsis ${this.getActiveClass('abuse-reports')}`}
to={siteRoot + 'sys/abuse-reports/'}
onClick={() => this.props.tabItemClick('abuse-reports')}
>
<span className="sf2-icon-monitor" aria-hidden="true"></span>
<span className="nav-text">{gettext('Abuse Reports')}</span>
</Link>
</li>
}
</ul>
</div>
</div>