summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2a6c91)
raw | patch | inline | side by side (parent: e2a6c91)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 09:06:49 +0000 (09:06 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 2 Nov 2006 09:06:49 +0000 (09:06 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@4993 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/personal/mail/class_mailAccount.inc | patch | blob | history | |
plugins/personal/mail/main.inc | patch | blob | history |
diff --git a/plugins/personal/mail/class_mailAccount.inc b/plugins/personal/mail/class_mailAccount.inc
index fd2d0ceeef2e2be7a870f1ef8c53096ea19be99c..3ec98eea56712c508990a30b94c541e4b7b118eb 100644 (file)
$filter.= "(!(|$exclude))";
}
- $acl= array($this->config->current['BASE'] => ":all");
$res= get_list("(&(objectClass=gosaMailAccount)$filter)", "users", $mailfilter['depselect'],
array("sn", "mail", "givenName"), GL_SIZELIMIT | GL_SUBSEARCH);
$ldap->cd($mailfilter['depselect']);
index f09d858ab8982b98d0f50465c94a89eb6c5783ec..d88189b908e6181cde4f52650b84313c6f01577e 100644 (file)
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
+$lock_msg ="";
+$display ="";
if (!$remove_lock){
/* Reset requested? */
if (isset($_POST['edit_cancel']) ||
}
/* Enter edit mode? */
- if (isset($_POST['edit'])){
+ if (isset($_POST['edit']) && preg_match("/w/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
/* Check locking */
if (($username= get_lock($ui->dn)) != ""){
$_SESSION['back_plugin']= $plug;
- gen_locked_message ($username, $ui->dn);
- exit ();
- }
+ $_SESSION['LOCK_VARS_TO_USE'] = array("/^edit$/","/^plug$/");
+ $lock_msg = gen_locked_message ($username, $ui->dn);
+
+ }else{
- /* Lock the current entry */
- add_lock ($ui->dn, $ui->dn);
- $_SESSION['dn']= $ui->dn;
- $_SESSION['edit']= TRUE;
+ /* Lock the current entry */
+ add_lock ($ui->dn, $ui->dn);
+ $_SESSION['dn']= $ui->dn;
+ $_SESSION['edit']= TRUE;
+ }
}
/* save changes to LDAP and disable edit mode */
}
/* Execute formular */
- $display= $mailAccount->execute ();
+ if($lock_msg){
+ $display.= $lock_msg;
+ }else{
+ $display.= $mailAccount->execute ();
+ }
/* Store changes in session */
if (isset ($_SESSION['edit'])){
$info= "";
/* Show page footer depending on the mode */
- if (!$mailAccount->forward_dialog && $mailAccount->is_account){
+ if (!$mailAccount->forward_dialog && $mailAccount->is_account && empty($lock_msg)){
$display.= "<p class=\"plugbottom\">";
/* Are we in edit mode? */
$info.= "<img alt=\"\" align=\"middle\" src=\"".get_template_path('images/lamp.png').
"\"> "._("Click the 'Edit' button below to change informations in this dialog");
- $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
+
+ if(preg_match("/w/",$ui->get_permissions($ui->dn,"users/mailAccount"))){
+ $display.= "<input type=submit name=\"edit\" value=\""._("Edit")."\">\n";
+ }
$display.= "<input type=\"hidden\" name=\"ignore\">\n";
}