aboutsummaryrefslogtreecommitdiff
path: root/mod/groups/actions/forums/deletepost.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/groups/actions/forums/deletepost.php')
-rw-r--r--mod/groups/actions/forums/deletepost.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/mod/groups/actions/forums/deletepost.php b/mod/groups/actions/forums/deletepost.php
index 2298a930a..9c89610bb 100644
--- a/mod/groups/actions/forums/deletepost.php
+++ b/mod/groups/actions/forums/deletepost.php
@@ -21,8 +21,8 @@
if ($post = get_annotation($post_id)) {
- //check that the user can edit
- if ($post->canEdit()) {
+ //check that the user can edit as well as admin
+ if ($post->canEdit() || ($post->owner_guid == $_SESSION['user']->guid)) {
//delete
$post->delete();