summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2a17f73)
raw | patch | inline | side by side (parent: 2a17f73)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 06:21:25 +0000 (06:21 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 26 Jun 2008 06:21:25 +0000 (06:21 +0000) |
-Ensure that we don't edit an entry twice, be reloading the browser.
-Keep the currently selected macro selected, also if we have no acls to read the currently selected macro.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11445 594d385d-05f5-0310-b6e9-bd551577e9d8
-Keep the currently selected macro selected, also if we have no acls to read the currently selected macro.
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11445 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc | patch | blob | history | |
gosa-plugins/gofon/gofon/phoneaccount/main.inc | patch | blob | history |
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc b/gosa-plugins/gofon/gofon/phoneaccount/class_phoneAccount.inc
index 548bc34ad7f420cc61ee2e2b0f67361f646c909c..111bfc8a82aba6798515bf582f5ee05ed7de7056 100644 (file)
* Search for all available phone hardware
*/
$tmp = get_sub_list("(objectClass=goFonHardware)","phone",array(get_ou("phoneou")),
- $this->config->current['BASE'],array("cn","description"), GL_NO_ACL_CHECK);
+ $this->config->current['BASE'],array("cn","description"), GL_SUBSEARCH);
foreach($tmp as $attrs){
$cn= $attrs['cn'][0];
$description= "";
get_ou("phoneou"));
$tmp = get_sub_list("(goFonHardware=*)","phone",$deps_a,$this->config->current['BASE'],
- array('cn','dn','goFonHardware'),GL_NO_ACL_CHECK);
+ array('cn','dn','goFonHardware'),GL_SUBSEARCH);
foreach($tmp as $attrs){
$cn = $attrs['goFonHardware'][0];
if(isset($this->hardware_list[$cn])){
* an array with name and parameters
*/
$tmp = get_sub_list("(&(objectClass=goFonMacro)(goFonMacroVisible=1))","gofonmacro",array(get_ou("macroou")),
- $this->config->current['BASE'],array("displayName","goFonMacroParameter","dn","cn"), GL_NONE);
+ $this->config->current['BASE'],array("displayName","goFonMacroParameter","dn","cn"), GL_NO_ACL_CHECK | GL_SUBSEARCH );
/* Add none for no macro*/
/* Fetch all Macros*/
foreach($tmp as $attrs){
+ $ui = get_userinfo();
+ $acl = $ui->get_permissions($attrs['dn'],"gofonmacro/macro","");
+
+ /* Skip all macros we are not able to read
+ execpt, the currently selected macro.
+ */
+ if(!preg_match("/r/",$acl) && !preg_match("/^".normalizePreg($attrs['dn'])."/",$this->goFonMacro)){
+ continue;
+ }
+
/* unset Count, we don't need that here */
unset($attrs['displayName']['count']);
diff --git a/gosa-plugins/gofon/gofon/phoneaccount/main.inc b/gosa-plugins/gofon/gofon/phoneaccount/main.inc
index 04318a13af42de2046f4c46b78e32b08bf3bc2cc..179b22af8dc36d43b71c7cfa7bc31c12ddba0102 100644 (file)
}
/* Enter edit mode? */
- if (isset($_POST['edit'])){
+ if (isset($_POST['edit']) && !session::is_set('edit')){
/* Check locking */
if (($username= get_lock($ui->dn)) != ""){