Fix: show Delete button to admins

This commit is contained in:
Christoph Haas 2021-02-20 22:27:22 +01:00
parent 2297059e84
commit 75083eed6f

View file

@ -1,7 +1,7 @@
// Button that reveals a dropdown/modal for moderation/reporting
.button-group.small.align-center
- if screenshot_uploaded_by_current_user?(screenshot)
- if (screenshot_uploaded_by_current_user?(screenshot) || (current_user && current_user.is_admin?))
a.button.small.bordered.radius.alert[
href=delete_screenshot_path(screenshot.id)
onclick="return confirm('Really delete the screenshot?');"