summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c5a90a1)
raw | patch | inline | side by side (parent: c5a90a1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 09:19:54 +0000 (09:19 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 10 Aug 2006 09:19:54 +0000 (09:19 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4464 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/plugins/admin/users/class_userManagement.inc b/plugins/admin/users/class_userManagement.inc
index 8e7f6415f5d3211649881503dfbdf87600bf5d9c..45a3c6d3ddf99940eeed8991f451694c589549ce 100644 (file)
above dialog */
add_lock ($this->dn, $this->ui->dn);
- /* Set up the users ACL's for this 'dn' */
- $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
-
/* Register usertab to trigger edit dialog */
$this->usertab= new usertabs($this->config,
$this->config->data['TABS']['USERTABS'], $this->dn);
/* Load permissions for selected 'dn' and check if
we're allowed to remove this 'dn' */
- $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
- $acl= get_module_permission($acl, "user", $this->dn);
- if (chkacl($acl, "password") == ""){
+ $ui = get_userinfo();
+ if (preg_match("/w/",$ui->get_permissions($this->dn,"users/password"))){
/* User is allowed to change passwords, save 'dn' and 'acl' for next
dialog. */
- $this->acl= $acl;
$_SESSION['objectinfo']= $this->dn;
return ($smarty->fetch(get_template_path('password.tpl', TRUE)));
/* Load permissions for selected 'dn' and check if
we're allowed to remove this 'dn' */
- $acl= get_permissions ($this->dn, $this->ui->subtreeACL);
- $this->acl= get_module_permission($acl, "user", $this->dn);
- if (chkacl($this->acl, "delete") == ""){
-
- /* Check locking, save current plugin in 'back_plugin', so
- the dialog knows where to return. */
- if (($user= get_lock($this->dn)) != ""){
- return(gen_locked_message ($user, $this->dn));
- }
- /* Lock the current entry, so nobody will edit it during deletion */
- add_lock ($this->dn, $this->ui->dn);
- $smarty->assign("info", sprintf(_("You're about to delete the user %s."), @LDAP::fix($this->dn)));
- return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
- } else {
-
- /* Obviously the user isn't allowed to delete. Show message and
- clean session. */
- print_red (_("You are not allowed to delete this user!"));
+ /* Check locking, save current plugin in 'back_plugin', so
+ the dialog knows where to return. */
+ if (($user= get_lock($this->dn)) != ""){
+ return(gen_locked_message ($user, $this->dn));
}
+
+ /* Lock the current entry, so nobody will edit it during deletion */
+ add_lock ($this->dn, $this->ui->dn);
+ $smarty->assign("info", sprintf(_("You're about to delete the user %s."), @LDAP::fix($this->dn)));
+ return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
}
foreach ($this->config->departments as $key => $value){
/* Get acls from different ou's */
- $acl= get_permissions (get_people_ou().$value, $this->ui->subtreeACL);
- $acl= get_module_permission($acl, "user", get_people_ou().$value);
-
+ $ui = get_userinfo();
+ $acl = $ui->get_permissions("cn=dummy,".$this->DivListUsers->selectedBase,"users/user") ;
+
/* If creation of a new user is allowed, append this template */
- if (chkacl($acl, "create") == ""){
+ if (preg_match("/cw/",$acl)){
/* Search all templates from the current dn */
$ldap->cd (get_people_ou().$value);
$this->usertab->adapt_from_template($template_dn);
$template_base = preg_replace("/^[^,]+,".normalizePreg(get_people_ou())."/", '', $template_dn);
$this->usertab->by_object['user']->base= $template_base;
-
- /* Set up the users ACL's for this 'dn' */
- $acl= get_permissions ($template_base, $this->ui->subtreeACL);
- $this->usertab->set_acl($acl);
}
if($s_action == "copy"){
$this->CopyPasteHandler->Clear();
$dn= $this->list[trim($s_entry)]['dn'];
- $acl= get_permissions ($dn, $this->ui->subtreeACL);
$obj = new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
$objNew = new usertabs($this->config, $this->config->data['TABS']['USERTABS'], "new");
- $obj->set_acl($acl);
- $objNew->set_acl($acl);
$this->CopyPasteHandler->Copy($obj,$objNew);
}
if($s_action == "cut"){
$this->CopyPasteHandler->Clear();
$dn= $this->list[trim($s_entry)]['dn'];
- $acl= get_permissions ($dn, $this->ui->subtreeACL);
$obj= new usertabs($this->config, $this->config->data['TABS']['USERTABS'], $dn);
- $obj->set_acl($acl);
$this->CopyPasteHandler->Cut($obj);
}
}
diff --git a/plugins/personal/connectivity/class_oxchangeAccount.inc b/plugins/personal/connectivity/class_oxchangeAccount.inc
index ba08ff19fda7e1ee919b5d4674cc8bc927fe41c2..5a89f8dd4a43124369441508f6e5fe612ddcd044 100644 (file)
}
$this->dnmode= $this->config->current['DNMODE'];
- $this->dnModeValue = $this->attrs[$this->dnmode][0];
+ if(isset($this->attrs[$this->dnmode][0])){
+ $this->dnModeValue = $this->attrs[$this->dnmode][0];
+ }
}
function execute()
diff --git a/plugins/personal/netatalk/class_netatalk.inc b/plugins/personal/netatalk/class_netatalk.inc
index e68bc4b6e84119bf3d0389d097e2e6e85302d46b..54c2c6f782a13ce7738eb1bae3ecf283e0315ec0 100644 (file)
$this->shares = array();
$ldap = $this->config->get_ldap_link();
- if($this->dn === "new" || $this->dn == NULL) {
+ if(($this->dn != "new" && $this->dn != NULL)) {
$ldap->cd($this->parent->by_object['user']->base);
} else {
$ldap->cd ($this->dn);