Render delete button partial for users

This commit is contained in:
Christoph Haas 2021-02-18 01:59:16 +01:00
parent d78362e45f
commit 499c59b761

View file

@ -28,6 +28,7 @@
' Uploaded by you
- unless screenshot.approved
' (needs to be approved)
= render(partial: 'admin_buttons', locals: {screenshot: screenshot})
// Is the user an admin?
// or does the screenshot belong to the user (determined by session cookie)
- if current_user && current_user.is_admin?