Only show delete icon when logged in. (#73)

Check for a valid login session before showing delete icons on ticks.

Reviewed-on: https://gitea.subcultureofone.org/greg/tkr/pulls/73
Co-authored-by: Greg Sarjeant <greg@subcultureofone.org>
Co-committed-by: Greg Sarjeant <greg@subcultureofone.org>
This commit is contained in:
Greg Sarjeant 2025-08-15 18:43:31 +00:00 committed by greg
parent d03c0a5331
commit d60230f975

View File

@ -23,7 +23,7 @@ class TicksView {
$relativeTime = Util::relative_time($tick['timestamp']);
?>
<li class="tick" tabindex="0">
<?php if ($tick['can_delete']): ?>
<?php if (Session::isLoggedIn() && $tick['can_delete']): ?>
<form method="post"
action="<?= Util::buildRelativeUrl($settings->basePath, "tick/{$tick['id']}/delete") ?>"
class="delete-tick-form">