summaryrefslogtreecommitdiff
path: root/edit_storage_inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'edit_storage_inc.php')
-rw-r--r--edit_storage_inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/edit_storage_inc.php b/edit_storage_inc.php
index fa3bb1b..5bf934b 100644
--- a/edit_storage_inc.php
+++ b/edit_storage_inc.php
@@ -3,7 +3,7 @@
* edit_storage_inc
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
* @package liberty
* @subpackage functions
*
@@ -38,7 +38,7 @@ if( !empty( $_REQUEST['deleteAttachment'] ) ) {
$attachmentInfo = $gContent->getAttachment( $attachmentId );
// TODO: Should we have a permission for deleting attachments?
- if( $gBitUser->isAdmin() || $attachmentInfo['user_id'] == $gBitUser->mUserId ) {
+ if( $gBitUser->isAdmin() || ($attachmentInfo['user_id'] == $gBitUser->mUserId && $gBitUser->hasPermission('p_liberty_delete_attachment')) ) {
$gContent->expungeAttachment( $attachmentId );
}
} elseif( !empty( $_REQUEST['detachAttachment'] ) ) {