summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e17db8c)
raw | patch | inline | side by side (parent: e17db8c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Apr 2010 13:45:13 +0000 (13:45 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Apr 2010 13:45:13 +0000 (13:45 +0000) |
-Applied bugfixes catched during testing trunk
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@17911 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.6@17911 594d385d-05f5-0310-b6e9-bd551577e9d8
diff --git a/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc b/gosa-plugins/gofax/gofax/faxaccount/class_gofaxAccount.inc
index 35121299af835ee1dc84e9eedfe3c75418942050..d3aa616399257cc8df8baf4de2ec7244a7c72fdf 100644 (file)
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
if ($this->is_modified){
- $this->handle_post_events("mofidy",array("uid" => $this->uid));
+ $this->handle_post_events("modify",array("uid" => $this->uid));
}
} else {
$this->handle_post_events("add",array("uid" => $this->uid));
diff --git a/gosa-plugins/goto/personal/environment/class_environment.inc b/gosa-plugins/goto/personal/environment/class_environment.inc
index 30afb96fa63740471c49103dcaf5083fc4ff6ee1..bf8550a3aa5a6220e7b6c1e902a1401f476f789b 100644 (file)
/* general settings */
// Sets the attributes which will kept on page reload, which will be saved, ...
- var $CopyPasteVars = array("gotoHotplugDevices","gotoAvailableShares","gotoShareSelections","gotoPrinterSel","gotoProfileFlagL","gotoXResolutions","gotoProfileFlagC","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn","gotoKioskProfile_Server","gotoKioskProfile_Profile");
+ var $CopyPasteVars = array("gotoHotplugDevices","gotoAvailableShares","gotoShareSelections","gotoPrinterSel", "gotoProfileFlagL","gotoXResolutions","gotoProfileFlagC","gotoProfileServers","useProfile","is_group","in_dialog","OrigCn", "gotoKioskProfile_Server","gotoKioskProfile_Profile", "gotoLogonScripts","gotoLogonScript","gotoShare","gotoShares");
var $attributes = array("uid","gotoProfileServer","gotoProfileFlags","gotoHotplugDeviceDN",
"gotoXResolution","gotoProfileQuota",
- "gotoLogonScripts","gotoLogonScript",
+ "gotoLogonScript","gotoLogonScripts","gotoHotplugDevices",
"gotoPrinter", "gosaDefaultPrinter",
- "gotoShares","gotoShare",
+ "gotoShare",
"gotoKioskProfile");
+
var $objectclasses = array("gotoEnvironment"); // Specifies the objectClass which contains the attributes edited here
var $cn;
var $OrigCn;
$type = "AddUser";
}elseif(isset($this->NewDeletedPrinters[$pname])){
$type = "AddUser";
+ }elseif($this->dn == "new"){
+ $type = "AddUser";
}elseif($printerObj->by_object['printgeneric']->AddMember("AddUser",$this->dn)){
$type = "AddUser";
}
diff --git a/gosa-plugins/mail/personal/mail/class_mailAccount.inc b/gosa-plugins/mail/personal/mail/class_mailAccount.inc
index 79428a6f43f70831bdc8c0ca89bd76f448a03788..1cf306a63fe880d45b601ca281c63f9920870ae0 100644 (file)
}
}
-
- /*! \brief Creates the mail part for the copy & paste dialog
- */
+ /*! \brief Creates the mail part for the copy & paste dialog
+ */
function getCopyDialog()
{
- if(!$this->is_account) return("");
- $smarty = get_smarty();
- $smarty->assign("mail",$this->mail);
- $smarty->assign("gosaMailAlternateAddress",$this->gosaMailAlternateAddress);
- $smarty->assign("gosaMailForwardingAddress",$this->gosaMailForwardingAddress);
+ if(!$this->is_account) return("");
+ $smarty = get_smarty();
+ $smarty->assign("mail",$this->mail);
+ $smarty->assign("gosaMailAlternateAddress",$this->gosaMailAlternateAddress);
+ $smarty->assign("gosaMailForwardingAddress",$this->gosaMailForwardingAddress);
+
+ $smarty->assign("domainSelectionEnabled", $this->mailMethod->domainSelectionEnabled());
+ $smarty->assign("MailDomains", $this->mailDomainParts);
+ $smarty->assign("MailDomain" , $this->mailDomainPart);
+ $smarty->assign("MailServers", $this->mailMethod->getMailServers());
+ $smarty->assign("isModifyableMail" , $this->mailMethod->isModifyableMail());
+ $smarty->assign("initially_was_account", $this->initially_was_account);
+
$str = $smarty->fetch(get_template_path("copypaste.tpl",TRUE, dirname(__FILE__)));
- $ret = array();
- $ret['status'] = "";
- $ret['string'] = $str;
- return($ret);
+ $ret = array();
+ $ret['status'] = "";
+ $ret['string'] = $str;
+ return($ret);
}
-
- /*! \brief save_object for copy&paste vars
- */
+
+ /*! \brief save_object for copy&paste vars
+ */
function saveCopyDialog()
{
- if(!$this->is_account) return;
+ if(!$this->is_account) return;
- /* Execute to save mailAlternateAddress && gosaMailForwardingAddress */
- $this->execute();
- if(isset($_POST['mail'])){
- $this->mail = $_POST['mail'];
- }
+ /* Execute to save mailAlternateAddress && gosaMailForwardingAddress */
+ $this->execute();
+ if(isset($_POST['mail'])){
+ $this->mail = $_POST['mail'];
+ }
}
-
- /*! \brief Prepare this account to be copied
+ /*! \brief Prepare this account to be copied
*/
function PrepareForCopyPaste($source)
{
- plugin::PrepareForCopyPaste($source);
+ plugin::PrepareForCopyPaste($source);
+
+ /* Reset alternate mail addresses */
+ $this->gosaMailAlternateAddress = array();
- /* Reset alternate mail addresses */
- $this->gosaMailAlternateAddress = array();
- }
+ /* If the doamin part is selectable, we have to split the mail address
+ */
+ if($this->mailMethod->domainSelectionEnabled()){
+ $this->mailDomainPart = preg_replace("/^[^@]*+@/","",$this->mail);
+ $this->mail = preg_replace("/@.*$/","\\1",$this->mail);
+ if(!in_array($this->mailDomainPart,$this->mailDomainParts)){
+ $this->mailDomainParts[] = $this->mailDomainPart;
+ }
+ }
+
+ // Initialize Vacation start/stop times
+ // This value is set to 'dd.mm.YYYY' if no times are set in the source object.
+ // But if they are set, then this values contain timestamps.
+ if(isset($source['gosaVacationStart'][0])){
+ $this->gosaVacationStart= date('d.m.Y', $source['gosaVacationStart'][0]);
+ $this->gosaVacationStop= date('d.m.Y', $source['gosaVacationStop'][0]);
+ }
+ }
/*! \brief Prepare this class the be useable when editing multiple users at once
*/
diff --git a/gosa-plugins/mail/personal/mail/copypaste.tpl b/gosa-plugins/mail/personal/mail/copypaste.tpl
index 8c8b3d0a7763e90f611753b468dd2c02aee9dc7b..acc931ee0dd55c92a50f3f81093458aa5a1300a2 100644 (file)
<table style="width:100%;">
<tr>
<td><label for="mail">{t}Primary address{/t}</label>{$must}</td>
- <td><input type='text' id="mail" name="mail" size=35 maxlength=65 value="{$mail}"></td>
+ {if !$isModifyableMail && $initially_was_account}
+ <input type='text' disabled size=30 value="{$mail}">
+ {else}
+ {if $domainSelectionEnabled}
+ <input type='text' id="mail" name="mail" size=20 maxlength=65 value="{$mail}">
+ @
+ <select name='MailDomain' size=1>
+ {html_options values=$MailDomains output=$MailDomains selected=$MailDomain}
+ </select>
+ {else}
+ <input type='text' id="mail" name="mail" size=35 maxlength=65 value="{$mail}">
+ {/if}
+ {/if}
+ </td>
</tr>
<tr>
<td colspan="2">
diff --git a/gosa-plugins/pptp/personal/connectivity/pptp/class_pptpAccount.inc b/gosa-plugins/pptp/personal/connectivity/pptp/class_pptpAccount.inc
index ebbf600a6249dcc9d0ba808fbf3ddb78f3f7bdab..3bc07fea6829db849b1a28a4411d3741d3de36a8 100644 (file)
/* Save to LDAP */
function save()
{
- if($this->acl_is_createable()){
plugin::save();
/* Write back to ldap */
/* Log last action */
if($this->initially_was_account){
- new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
- new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));
}
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
- if ($this->is_modified){
- $this->handle_post_events("modify",array("uid" => $this->uid));
- }
+ if ($this->is_modified){
+ $this->handle_post_events("modify",array("uid" => $this->uid));
+ }
} else {
- $this->handle_post_events("add",array("uid" => $this->uid));
+ $this->handle_post_events("add",array("uid" => $this->uid));
}
- }
}
diff --git a/gosa-plugins/pureftpd/personal/connectivity/pureftpd/class_pureftpdAccount.inc b/gosa-plugins/pureftpd/personal/connectivity/pureftpd/class_pureftpdAccount.inc
index 3410cedfaf9663de8846c607b1dceb4e5a89c115..2042f8a4014bc601dff1ca7c99a36627f81bc792 100644 (file)
{
plugin::save();
- $tmp = $this->plInfo();
- foreach($tmp['plProvidedAcls'] as $key => $desc){
- if(!$this->acl_is_writeable($key)){
- unset($this->attrs[$key]);
- }
- }
/* Write back to ldap */
$ldap= $this->config->get_ldap_link();
diff --git a/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc b/gosa-plugins/rolemanagement/admin/roleManagement/tabs_roles.inc
index 0441fdbb99bc44ae6157ac3edd8bf4dcb6083852..5ab586cf633f2cfdf55a4a7ba3dabb35a428e3ef 100644 (file)
function __construct($config, $data, $dn,$hide_refs = FALSE, $hide_acls = FALSE)
{
- tabs::tabs($config, $data, $dn,"roles",$hide_refs, $hide_acls);
+ tabs::tabs($config, $data, $dn,$hide_refs, $hide_acls);
$this->base = $baseobject= $this->by_object['roleGeneric']->base;
$this->addSpecialTabs();
diff --git a/gosa-plugins/samba/personal/samba/class_sambaAccount.inc b/gosa-plugins/samba/personal/samba/class_sambaAccount.inc
index bf86d6a46275ce138becfcaa177fae67575b5b87..ee352e7cb9f5be0dea0f7dd05b67363c378d3b06 100644 (file)
/* attribute list for save action */
var $ctxattributes= array();
- var $attributes= array();
- var $objectclasses= array();
+ var $attributes= array("sambaSID", "sambaPwdLastSet", "sambaLogonTime",
+ "sambaLogoffTime", "sambaKickoffTime", "sambaPwdCanChange",
+ "sambaPwdMustChange", "sambaAcctFlags", "uid", "sambaMungedDial",
+ "sambaHomePath", "sambaHomeDrive", "sambaLogonScript",
+ "sambaProfilePath", "sambaPrimaryGroupSID", "sambaDomainName",
+ "sambaUserWorkstations", "sambaPasswordHistory",
+ "sambaLogonHours", "sambaBadPasswordTime",
+ "sambaBadPasswordCount");
+ var $objectclasses= array('sambaSamAccount');
var $uid= "";
var $CopyPasteVars = array("kickoff_time_set","logoff_time_set","logon_time_set","mungedObject","orig_sambaDomainName");
function sambaAccount (&$config, $dn= NULL)
{
- /* Load attributes depending on the samba version */
- $this->attributes= array ("sambaSID", "sambaPwdLastSet", "sambaLogonTime",
- "sambaLogoffTime", "sambaKickoffTime", "sambaPwdCanChange",
- "sambaPwdMustChange", "sambaAcctFlags", "uid", "sambaMungedDial",
- "sambaHomePath", "sambaHomeDrive", "sambaLogonScript",
- "sambaProfilePath", "sambaPrimaryGroupSID", "sambaDomainName",
- "sambaUserWorkstations", "sambaPasswordHistory",
- "sambaLogonHours", "sambaBadPasswordTime",
- "sambaBadPasswordCount");
- $this->objectclasses= array ("sambaSamAccount");
$this->mungedObject= new sambaMungedDial;
$this->ctxattributes= $this->mungedObject->ctxattributes;
/* Open Samaba Logong hours dialog */
if(isset($_POST['SetSambaLogonHours']) && $this->acl_is_readable("sambaLogonHours")){
- $this->dialog = new sambaLogonHours($this->config,$this->dn,$this->sambaLogonHours);
+ $this->dialog = new sambaLogonHours($this->config,$this->dn,$this->sambaLogonHours, $this->getacl('sambaLogonHours'));
}
/* Cancel dialog */
/* Set a new SID */
$this->sambaSID = "";
+
+ /* Fill mungedDial field */
+ if (isset($source['sambaMungedDial'])){
+ $this->mungedObject->load($source['sambaMungedDial'][0]);
+ }
+
+ /* Password expiery */
+ if(isset($source['sambaPwdMustChange']) &&
+ $source['sambaPwdMustChange'][0] != 0){
+ $this->password_expires= 1;
+ }
+
+ if(isset($source['sambaLogonTime']) && ! (
+ $source['sambaLogonTime'][0] == 0 ||
+ $source['sambaLogonTime'][0] == 2147483647
+ )){
+ $this->logon_time_set= 1;
+ }
+ if(isset($source['sambaLogoffTime']) && ! (
+ $source['sambaLogoffTime'][0] == 0 ||
+ $source['sambaLogoffTime'][0] == 2147483647
+ )){
+ $this->logoff_time_set= 1;
+ }
+
+ /* Account expiery */
+ if(isset($source['sambaKickoffTime']) && ! (
+ $source['sambaKickoffTime'][0] == 0 ||
+ $source['sambaKickoffTime'][0] == 2147483647
+ )){
+ $this->kickoff_time_set= 1;
+ }
+
+
+ if(isset($source['sambaKickoffTime'][0])){
+ $this->sambaKickoffTime = date('d.m.Y', $source['sambaKickoffTime'][0]);
+ }
}
}
diff --git a/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc b/gosa-plugins/samba/personal/samba/class_sambaLogonHours.inc
index d37cd2e64492db3e8c319b9c13fd61d600479391..eea9195792440b564d4ba83ac88b2de3c8954ade 100644 (file)
var $Matrix = array();
var $timezone = 0;
var $config;
+ var $acl;
- function sambaLogonHours (&$config, $dn, $slh)
+ function sambaLogonHours (&$config, $dn, $slh, $acl = 'rw')
{
plugin::plugin($config,$dn);
$this->sambaLogonHours = $slh;
+ $this->acl = $acl;
/* Get default timezone */
$zone = timezone::get_default_timezone();
$ui =get_userinfo();
$smarty = get_smarty();
- $acl = $ui->get_permissions($this->dn,"users/sambaAccount","sambaLogonHours");
- $smarty->assign("acl",preg_match("/w/i",$acl));
+ $smarty->assign("acl",preg_match("/w/i",$this->acl));
$hours = array();
for($i = 0 ; $i <24 ; $i++ ){
diff --git a/gosa-plugins/webdav/personal/connectivity/webdav/class_webdavAccount.inc b/gosa-plugins/webdav/personal/connectivity/webdav/class_webdavAccount.inc
index 3af4185d9520d776b6f6d756ddb4a7f7ec0b03be..9cf3a2765d99f5c4f3d3a4b654844561e9e85c78 100644 (file)
/* Save to LDAP */
function save()
{
- if($this->acl_is_createable()){
plugin::save();
/* Write back to ldap */
/* Log last action */
if($this->initially_was_account){
- new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("modify","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}else{
- new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
+ new log("create","users/".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());
}
if (!$ldap->success()){
- msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
+ msg_dialog::display(_("LDAP error"), msgPool::ldaperror($ldap->get_error(), $this->dn, LDAP_MOD, get_class()));
}
/* Optionally execute a command after we're done */
if ($this->initially_was_account == $this->is_account){
- if ($this->is_modified){
- $this->handle_post_events("modify",array("uid" => $this->uid));
- }
+ if ($this->is_modified){
+ $this->handle_post_events("modify",array("uid" => $this->uid));
+ }
} else {
- $this->handle_post_events("add",array("uid" => $this->uid));
+ $this->handle_post_events("add",array("uid" => $this->uid));
}
- }
}
+
/* Return plugin informations for acl handling
#FIXME This is only an enable/disable checkbox for this account, there is possibly a better solution available later */
static function plInfo()