new WCF.Comment.Response.Like({if $__wcf->getUser()->userID && $__wcf->getSession()->getPermission('user.like.canLike')}1{else}0{/if}, {@LIKE_ENABLE_DISLIKE}, false, {@LIKE_ALLOW_FOR_OWN_CONTENT});
{/if}
- new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.comment', '.jsReportCommentComment');
- new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.response', '.jsReportCommentResponse');
+ {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.comment', '.jsReportCommentComment');
+ new WCF.Moderation.Report.Content('com.woltlab.wcf.comment.response', '.jsReportCommentResponse');
+ {/if}
});
//]]>
</script>
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="commentOptions">
- <li class="jsReportCommentComment jsOnly" data-object-id="{@$comment->commentID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
+ {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ <li class="jsReportCommentComment jsOnly" data-object-id="{@$comment->commentID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
+ {/if}
{event name='commentOptions'}
</ul>
<nav class="jsMobileNavigation buttonGroupNavigation">
<ul class="commentOptions">
- <li class="jsReportCommentResponse jsOnly" data-object-id="{@$response->responseID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
+ {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ <li class="jsReportCommentResponse jsOnly" data-object-id="{@$response->responseID}"><a title="{lang}wcf.moderation.report.reportContent{/lang}" class="jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.moderation.report.reportContent{/lang}</span></a></li>
+ {/if}
{event name='commentOptions'}
</ul>
});
{/if}
- WCF.Language.addObject({
- 'wcf.moderation.report.reportContent': '{lang}wcf.user.profile.report{/lang}',
- 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
- });
- new WCF.Moderation.Report.Content('com.woltlab.wcf.user', '.jsReportUser');
+ {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ WCF.Language.addObject({
+ 'wcf.moderation.report.reportContent': '{lang}wcf.user.profile.report{/lang}',
+ 'wcf.moderation.report.success': '{lang}wcf.moderation.report.success{/lang}'
+ });
+ new WCF.Moderation.Report.Content('com.woltlab.wcf.user', '.jsReportUser');
+ {/if}
{event name='javascriptInit'}
});
</li>
{/hascontent}
- <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li>
+ {if $__wcf->session->getPermission('user.profile.canReportContent')}
+ <li class="jsReportUser jsOnly" data-object-id="{@$user->userID}"><a title="{lang}wcf.user.profile.report{/lang}" class="button jsTooltip"><span class="icon icon16 icon-warning-sign"></span> <span class="invisible">{lang}wcf.user.profile.report{/lang}</span></a></li>
+ {/if}
{if $user->userID != $__wcf->user->userID && $user->isAccessible('canViewEmailAddress')}
<li><a class="button jsTooltip" href="mailto:{@$user->getEncodedEmail()}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>{elseif $user->isAccessible('canMail') && $__wcf->session->getPermission('user.profile.canMail')}<li><a class="button jsTooltip" href="{link controller='Mail' object=$user}{/link}" title="{lang}wcf.user.button.mail{/lang}"><span class="icon icon16 icon-envelope-alt"></span> <span class="invisible">{lang}wcf.user.button.mail{/lang}</span></a></li>
{if $isAccessible && $__wcf->user->userID != $user->userID && ($__wcf->session->getPermission('admin.user.canBanUser') || $__wcf->session->getPermission('admin.user.canDisableAvatar') || $__wcf->session->getPermission('admin.user.canDisableSignature') || ($__wcf->session->getPermission('admin.general.canUseAcp') && $__wcf->session->getPermission('admin.user.canEditUser')))}
<li class="dropdown">
{* todo: better icon? *}
- <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 icon-lock"></span> <span class="invisible">{lang}{lang}wcf.acp.user.edit{/lang}{/lang}</span></a>
+ <a href="{link controller='UserEdit' object=$user isACP=true}{/link}" class="button jsTooltip jsUserInlineEditor" title="{lang}wcf.user.moderate{/lang}"><span class="icon icon16 fa-wrench"></span> <span class="invisible">{lang}wcf.acp.user.edit{/lang}</span></a>
<ul class="dropdownMenu"></ul>
</li>
{/if}
<defaultvalue>0</defaultvalue>
<admindefaultvalue>1</admindefaultvalue>
</option>
+ <option name="user.profile.canReportContent">
+ <categoryname>user.profile</categoryname>
+ <optiontype>boolean</optiontype>
+ <defaultvalue>1</defaultvalue>
+ </option>
<option name="user.profile.aboutMeMaxLength">
<categoryname>user.profile</categoryname>
<optiontype>integer</optiontype>
* Validates parameters to prepare a report.
*/
public function validatePrepareReport() {
+ WCF::getSession()->checkPermissions(array('user.profile.canReportContent'));
+
$this->readInteger('objectID');
$this->readString('objectType');
* Validates parameters for reporting.
*/
public function validateReport() {
+ WCF::getSession()->checkPermissions(array('user.profile.canReportContent'));
+
$this->readString('message');
$this->validatePrepareReport();
<item name="wcf.acp.group.assignment.userGroup"><![CDATA[Benutzergruppe]]></item>
<item name="wcf.acp.group.assignment.isDisabled"><![CDATA[Automatische Zuordnung deaktivieren]]></item>
<item name="wcf.acp.group.option.user.profile.aboutMeMaxLength"><![CDATA[Maximallänge „Über mich“]]></item>
+ <item name="wcf.acp.group.option.user.profile.canReportContent"><![CDATA[Kann Inhalte melden]]></item>
</category>
<category name="wcf.acp.index">
<item name="wcf.acp.group.assignment.userGroup"><![CDATA[User Group]]></item>
<item name="wcf.acp.group.assignment.isDisabled"><![CDATA[Disable Automatic Assignment]]></item>
<item name="wcf.acp.group.option.user.profile.aboutMeMaxLength"><![CDATA[TODO: Maximallänge „Über mich“]]></item>
+ <item name="wcf.acp.group.option.user.profile.canReportContent"><![CDATA[TODO: Kann Inhalte melden]]></item>
</category>
<category name="wcf.acp.index">