Skip to content

Commit

Permalink
Merge pull request #300 from fpellet/fix-avatar-edit
Browse files Browse the repository at this point in the history
Fix avatar upload when admin role
  • Loading branch information
albogdano committed Apr 16, 2022
2 parents d5aa255 + b307733 commit 55c2a86
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/templates/base.vm
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@
<script nonce="$cspNonce" src="$!scriptslink/highlight.min.js?r=$!rev"></script>
#end
<script nonce="$cspNonce" src="$!scriptslink/easymde.min.js?r=$!rev"></script>
#if($scooldUtils.isAvatarUploadsEnabled() && $request.getServletPath() == $profilelink)
#set($avatarUploadsEnabledBool = $scooldUtils.isAvatarUploadsEnabled() && $authenticated && $request.getServletPath().startsWith($profilelink))
#if($avatarUploadsEnabledBool)
<script nonce="$cspNonce" src="$!scriptslink/inline-attachment.min.js?r=$!rev"></script>
#end

Expand All @@ -413,7 +414,6 @@
#set($isAdminJS = "IS_ADMIN = $isAdmin")
#set($maxTagsJS = "MAX_TAGS_PER_POST = $MAX_TAGS_PER_POST")
#set($minPassLen = "MIN_PASS_LENGTH = $MIN_PASS_LENGTH")
#set($avatarUploadsEnabledBool = $scooldUtils.isAvatarUploadsEnabled() && $authenticated && $request.getServletPath() == $profilelink)
#set($avatarUploadsEnabledJS = "AVATAR_UPLOADS_ENABLED = $avatarUploadsEnabledBool")
#set($_welcomeMsg = $scooldUtils.getWelcomeMessage($authUser))
#set($_welcomeMessageJS = "WELCOME_MESSAGE = '$_welcomeMsg'")
Expand Down

0 comments on commit 55c2a86

Please sign in to comment.