Hide edit button when not authorized

This commit is contained in:
Eduard Urbach 2018-04-10 21:28:50 +02:00
parent 76831c469f
commit 1d658a9e76

View File

@ -11,6 +11,7 @@ component CharacterDetails(character *arn.Character, characterAnime []*arn.Anime
.character-image-container.mountable .character-image-container.mountable
img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical) img.character-image-fullsize(src=character.ImageLink("large"), alt=character.Name.Canonical)
if user != nil && (user.Role == "editor" || user.Role == "admin")
.buttons .buttons
a.button(href=character.Link() + "/edit") a.button(href=character.Link() + "/edit")
Icon("pencil") Icon("pencil")