From: hickert Date: Tue, 5 Dec 2006 05:25:38 +0000 (+0000) Subject: Fixed edit in addressbook X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=45c4ef1b4cc034ce660f33f56849b2c8c1ed0879;p=gosa.git Fixed edit in addressbook git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5301 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/addons/addressbook/class_addressbook.inc b/plugins/addons/addressbook/class_addressbook.inc index 74377a86f..7b7b95ca0 100644 --- a/plugins/addons/addressbook/class_addressbook.inc +++ b/plugins/addons/addressbook/class_addressbook.inc @@ -131,6 +131,7 @@ class addressbook extends plugin $acl = $this->get_entry_acls($this->abobjectclass.",".$phonefilter['search_base']); $smarty->assign("internal_createable", preg_match("/c/",$acl)); $smarty->assign("internal_removeable", preg_match("/d/",$acl)); + $smarty->assign("internal_editable", preg_match("/w/",$acl)); /* Perform actions with CTI hook */ if (isset($_GET['target']) @@ -537,7 +538,7 @@ class addressbook extends plugin foreach ($this->attributes as $name){ /* Skip entries we are not allowed to read */ - if(!preg_match("/r/",$this->get_entry_acls($_SESSION['show_info'],$name))){ + if(!preg_match("/r/",$this->get_entry_acls($this->dn,$name))){ $smarty->assign("info_$name", ""); }else diff --git a/plugins/addons/addressbook/contents.tpl b/plugins/addons/addressbook/contents.tpl index 80472c950..30d03124b 100644 --- a/plugins/addons/addressbook/contents.tpl +++ b/plugins/addons/addressbook/contents.tpl @@ -43,18 +43,21 @@

- {if $internal_createable} +{if $internal_createable}   {t}Add entry{/t}
- {/if} - {if $internal eq 0} +{/if} + +{if $internal eq 0} + {if $internal_editable}   {t}Edit entry{/t}
- {if $internal_removeable} + {/if} + {if $internal_removeable}   {t}Remove entry{/t}
- {/if} - {/if} + {/if} +{/if}