From: Marcel Werk Date: Fri, 27 Dec 2013 21:39:09 +0000 (+0100) Subject: Fixed missing permission check X-Git-Tag: 2.0.1~18 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2114e1874e454f15ba4982d6ef8ed5ff525f4c3a;p=GitHub%2FWoltLab%2FWCF.git Fixed missing permission check --- diff --git a/com.woltlab.wcf/templates/avatarEdit.tpl b/com.woltlab.wcf/templates/avatarEdit.tpl index 6885742013..b937e978a2 100644 --- a/com.woltlab.wcf/templates/avatarEdit.tpl +++ b/com.woltlab.wcf/templates/avatarEdit.tpl @@ -53,34 +53,36 @@ -
-
- {if $avatarType == 'custom'} - {assign var='__customAvatar' value=$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(96)} - {if $__wcf->getUserProfileHandler()->getAvatar()->canCrop()} - {assign var='__customAvatar' value=$__customAvatar|substr:0:-2} - {assign var='__customAvatarTitle' value='wcf.user.avatar.type.custom.crop'|language} - {append var='__customAvatar' value='class="userAvatarCrop jsTooltip" title="'|concat:$__customAvatarTitle:'" />'} + {if $__wcf->getSession()->getPermission('user.profile.avatar.canUploadAvatar')} +
+
+ {if $avatarType == 'custom'} + {assign var='__customAvatar' value=$__wcf->getUserProfileHandler()->getAvatar()->getImageTag(96)} + {if $__wcf->getUserProfileHandler()->getAvatar()->canCrop()} + {assign var='__customAvatar' value=$__customAvatar|substr:0:-2} + {assign var='__customAvatarTitle' value='wcf.user.avatar.type.custom.crop'|language} + {append var='__customAvatar' value='class="userAvatarCrop jsTooltip" title="'|concat:$__customAvatarTitle:'" />'} + {/if} + {@$__customAvatar} + {else} + {/if} - {@$__customAvatar} - {else} - - {/if} -
-
- - {lang}wcf.user.avatar.type.custom.description{/lang} - - {* placeholder for upload button: *} -
- - {if $errorField == 'custom'} - - {if $errorType == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if} - - {/if} -
-
+
+
+ + {lang}wcf.user.avatar.type.custom.description{/lang} + + {* placeholder for upload button: *} +
+ + {if $errorField == 'custom'} + + {if $errorType == 'empty'}{lang}wcf.global.form.error.empty{/lang}{/if} + + {/if} +
+
+ {/if} {if MODULE_GRAVATAR} @@ -113,30 +115,32 @@ {include file='footer'} - + }); + //]]> + +{/if}