lock only open if the user is the owner

lock remains closed, and rotated when logged in but not the wiki owner.
This commit is contained in:
Paul Rodwell
2018-09-21 17:45:59 +01:00
parent d84a282bb3
commit 71cd00b86a

View File

@ -53,11 +53,11 @@ update_footer = (ownerName, isAuthenticated) ->
if isAuthenticated if isAuthenticated
if isOwner if isOwner
logoutTitle = "Sign-out" logoutTitle = "Sign-out"
logoutIconClass = '' logoutIconClass = 'fa fa-unlock fa-lg fa-fw'
else else
logoutTitle = "Not Owner : Sign-out" logoutTitle = "Not Owner : Sign-out"
logoutIconClass = 'notOwner' logoutIconClass = 'fa fa-lock fa-lg fa-fw notOwner'
$('footer > #security').append "<a href='#' id='logout' class='footer-item' title='#{logoutTitle}'><i class='fa fa-unlock fa-lg fa-fw #{logoutIconClass}'></i></a>" $('footer > #security').append "<a href='#' id='logout' class='footer-item' title='#{logoutTitle}'><i class='#{logoutIconClass}'></i></a>"
$('footer > #security > #logout').click (e) -> $('footer > #security > #logout').click (e) ->
e.preventDefault() e.preventDefault()
myInit = { myInit = {