Hide edit button when not authorized
This commit is contained in:
parent
76831c469f
commit
1d658a9e76
@ -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")
|
||||||
|
Loading…
Reference in New Issue
Block a user