diff --git a/plugins/admin/ogroups/class_mailogroup.inc b/plugins/admin/ogroups/class_mailogroup.inc
index ed9d9ed6d3aed3bb6c9e494cb5be2084c5b48b08..3dd55699d624f5055858ff9f73875ebffac1ab15 100644 (file)
function execute()
{
- /* Call parent execute */
- plugin::execute();
+ /* Call parent execute */
+ plugin::execute();
+
/* Do we need to flip is_account state? */
if (isset($_POST['modify_state'])){
- $this->is_account= !$this->is_account;
+
+ /* Onyl change account state if allowed */
+ if($this->is_account && $this->acl == "#all#"){
+ $this->is_account= !$this->is_account;
+ }elseif(!$this->is_account && chkacl($this->acl,"create") == ""){
+ $this->is_account= !$this->is_account;
+ }
}
/* Show tab dialog headers */
/* Check if mail address is already in use */
$ldap->cd($this->config->current['BASE']);
- $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail. ")(gosaMailAlternateAddress=".$this->mail."))(!(cn=".$this->cn.")))", array("uid"));
+ $ldap->search ("(&(!(objectClass=gosaUserTemplate))(|(mail=".$this->mail.")(gosaMailAlternateAddress=".$this->mail."))(!(cn=".$this->cn.")))", array("uid"));
if ($ldap->count() != 0){
$message[]= _("The primary address you've entered is already in use.");
}
function getCopyDialog()
{
- $str = "";
- $str .= _("Phone number");
- $str .= " <input type='text' name='mail' value='".$this->mail."'>";
- return($str);
+ $str = "";
+ $smarty = get_smarty();
+ $smarty->assign("mail", $this->mail);
+ $str = $smarty->fetch(get_template_path("paste_mail.tpl",TRUE,dirname(__FILE__)));
+ $ret = array();
+ $ret['string'] = $str;
+ $ret['status'] = "";
+ return($ret);
}
-
function saveCopyDialog()
{
if(isset($_POST['mail'])){