[opw-web] Don't show controls to delete attachments when project isn't editable
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [opw-web] Don't show controls to delete attachments when project isn't editable
- Date: Wed, 19 Mar 2014 14:35:22 +0000 (UTC)
commit 03c8fd53601eb225501ad7a504d50e27140302bc
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Mar 18 16:11:04 2014 -0400
Don't show controls to delete attachments when project isn't editable
modules/mod_view_projects.php | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/modules/mod_view_projects.php b/modules/mod_view_projects.php
index 27989b7..facad03 100644
--- a/modules/mod_view_projects.php
+++ b/modules/mod_view_projects.php
@@ -583,7 +583,7 @@ else if ($action == 'view')
// Attachments
$can_view_attachments = $is_owner || $role == 'm' || $user->is_admin;
- $can_delete_attachments = $is_owner || $user->is_admin;
+ $can_delete_attachments = $project_permissions->can_edit;
if ($can_view_attachments) {
$sql = "SELECT * FROM {$db->prefix}attachments " .
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]