From 948cead0f11d33adbcf0d08773c716e1b6ebb101 Mon Sep 17 00:00:00 2001 From: Jonas Kohl Date: Fri, 13 Sep 2024 23:10:34 +0200 Subject: More changes --- src/application/views/view_topic_start.php | 39 +++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) (limited to 'src/application/views/view_topic_start.php') diff --git a/src/application/views/view_topic_start.php b/src/application/views/view_topic_start.php index 84a29de..4006982 100644 --- a/src/application/views/view_topic_start.php +++ b/src/application/views/view_topic_start.php @@ -3,13 +3,19 @@ use mystic\forum\orm\UserPermissions; $canReply = $GLOBALS["currentUser"]?->hasPermission(UserPermissions::CREATE_OWN_POST) ?? false; +$canEdit = ($GLOBALS["currentUser"]?->id === $topicAuthor->id && $topicAuthor->hasPermission(UserPermissions::EDIT_OWN_TOPIC)) + || ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::EDIT_OTHER_TOPIC)); + $canDelete = ($GLOBALS["currentUser"]?->id === $topicAuthor->id && $topicAuthor->hasPermission(UserPermissions::DELETE_OWN_TOPIC)) || ($GLOBALS["currentUser"]?->hasPermission(UserPermissions::DELETE_OTHER_TOPIC)); ?> -
Started by @@ -31,8 +51,21 @@ Started by on = htmlentities($topic->creationDate->format("c")) ?>
-