From 2114e1874e454f15ba4982d6ef8ed5ff525f4c3a Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 27 Dec 2013 22:39:09 +0100 Subject: [PATCH] Fixed missing permission check --- com.woltlab.wcf/templates/avatarEdit.tpl | 104 ++++++++++++----------- 1 file changed, 54 insertions(+), 50 deletions(-) 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} -- 2.20.1