From 338f3f246feec58f1c6c2704ec195fab27c6c3dc Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Tue, 7 Oct 2008 09:05:48 +0000 Subject: [PATCH] file_access hook for attachments --- addressbook/inc/class.addressbook_bo.inc.php | 12 ++++++++++++ addressbook/inc/class.addressbook_hooks.inc.php | 1 + 2 files changed, 13 insertions(+) diff --git a/addressbook/inc/class.addressbook_bo.inc.php b/addressbook/inc/class.addressbook_bo.inc.php index add2137f27..24dddc9e7b 100755 --- a/addressbook/inc/class.addressbook_bo.inc.php +++ b/addressbook/inc/class.addressbook_bo.inc.php @@ -913,6 +913,18 @@ class addressbook_bo extends addressbook_so return $result; } + /** + * Check access to the projects file store + * + * @param int $id id of entry + * @param int $check EGW_ACL_READ for read and EGW_ACL_EDIT for write or delete access + * @return boolean true if access is granted or false otherwise + */ + function file_access($id,$check,$rel_path) + { + return $this->check_perms($check,$id); + } + /** * returns info about contacts for calender * diff --git a/addressbook/inc/class.addressbook_hooks.inc.php b/addressbook/inc/class.addressbook_hooks.inc.php index 7c7386f80c..d188f07ab0 100644 --- a/addressbook/inc/class.addressbook_hooks.inc.php +++ b/addressbook/inc/class.addressbook_hooks.inc.php @@ -292,6 +292,7 @@ class addressbook_hooks 'add_app' => 'link_app', 'add_id' => 'link_id', 'add_popup' => '850x440', + 'file_access'=> 'addressbook.addressbook_bo.file_access', ); }