index 11872bff37894fe4d495c480d5a5016b89e2ec88..5d4fbc3dc48b0ffdc532853b7e7cc6179099ee25 100644 (file)
var $peopledn = "cn";
var $uidbase = 1000;
+ var $strict = TRUE;
+
+ var $header_image = "images/ldapserver.png";
+ var $account_expiration =FALSE;
var $base_hook = "/usr/bin/sudo myscript";
var $base_hook_active = FALSE;
var $encryption = "crypt";
- var $mail = "none";
var $theme = "default";
var $errorlvl = FALSE;
- var $cyrusunixstyle = FALSE;
+
+ var $include_personal_title = FALSE;
+ var $rfc2307bis = FALSE;
var $pwd_rules = array("pwminlen" => 6,
"pwminlen_active" => FALSE,
"externalpwdhook" => "/path/to/your/script username oldpassword newpassword",
"externalpwdhook_active" => FALSE);
- var $mail_settings = array("vacationdir" => "/etc/gosa/vacation",
- "vacationdir_active" => FALSE);
-
- var $crypt_methods = array();
- var $mail_methods = array();
+ var $id_settings = array( "idgen" => "{%sn}-{%givenName[2-4]}",
+ "idgen_active" => FALSE,
+ "minid" => "100",
+ "minid_active" => FALSE);
+ var $crypt_methods = array();
- var $attributes = array("peopleou","groupou","peopledn","uidbase","encryption","mail","theme","errorlvl","cyrusunixstyle",
- "base_hook","base_hook_active");
+ var $attributes = array("peopleou","groupou","peopledn","uidbase","encryption","theme","errorlvl","rfc2307bis",
+ "base_hook","base_hook_active","account_expiration","strict","include_personal_title");
function Step_Config1()
{
foreach($tmp['name'] as $name){
$this->crypt_methods[$name] = $name;
}
- $tmp = $this->get_available_mail_classes();
- foreach($tmp['name'] as $name){
- $this->mail_methods[$name] = $name;
- }
}
function update_strings()
{
$this->s_title = _("GOsa settings 1/3");
- $this->s_title_long = _("GOsa generic settings, page 1/3");
- $this->s_info = _("This dialog allows you to setup GOsa behaviour");
+ $this->s_title_long = _("GOsa settings 1/3");
+ $this->s_info = _("GOsa generic settings");
}
{
$smarty = get_smarty();
$smarty->assign("peopledns",array("uid","cn"));
+ $smarty->assign("id_settings",$this->id_settings);
$smarty->assign("crypt_methods",$this->crypt_methods);
- $smarty->assign("mail_methods",$this->mail_methods);
$smarty->assign("themes",$this->get_themes());
$smarty->assign("pwd_rules",$this->pwd_rules);
- $smarty->assign("mail_settings",$this->mail_settings);
$smarty->assign("bool",array(FALSE => _("No"), TRUE => _("Yes")));
- $smarty->assign("warnings" ,$this->check());
- $smarty->assign("warnings_cnt" ,count($this->check()));
foreach($this->attributes as $attr){
$smarty->assign($attr,$this->$attr);
}
- return($smarty -> fetch (get_template_path("../setup/setup_step5.tpl")));
+ return($smarty -> fetch (get_template_path("../setup/setup_config1.tpl")));
}
- /* Returns the classnames auf the mail classes */
- function get_available_mail_classes()
- {
- $dir = opendir( "../include");
- $methods = array();
- $suffix = "class_mail-methods-";
- $lensuf = strlen($suffix);
- $prefix = ".inc";
- $lenpre = strlen($prefix);
- $i = 0;
- while (($file = readdir($dir)) !== false){
-
- if(stristr($file,$suffix)) {
- $lenfile = strlen($file);
- $methods['name'][$i] = substr($file,$lensuf,($lenfile-$lensuf)-$lenpre);
- $methods['file'][$i] = $file;
- $methods[$i]['file'] = $file;
- $methods[$i]['name'] = substr($file,$lensuf,($lenfile-$lensuf)-$lenpre);
- $i++;
- }
- }
- return($methods);
- }
-
function get_themes()
{
$dir = opendir( "../ihtml/themes/");
{
$message = array();
+ if(isset($this->id_settings['minid_active']) && !is_numeric($this->id_settings['minid'])){
+ $message[] = sprintf(_("The specified value for '%s' must be a numeric value"),_("GID / UID min id"));
+ }
+
if(preg_match("/,$/",$this->peopleou)){
$message[] =sprintf(_("Don't add a trailing comma to '%s'."),_("People storage ou"));
}
$message[] = _("The given password differ value is not numeric.");
}
return($message);
-
}
function save_object()
}
}
+ if(isset($_POST['minid_active'])){
+ $this->id_settings['minid_active'] = TRUE;
+ if(isset($_POST['minid'])){
+ $this->id_settings['minid'] = $_POST['minid'];
+ }
+ }else{
+ $this->id_settings['minid_active'] = FALSE;
+ }
+
+ /* Generic settings */
+ if(isset($_POST['idgen_active'])){
+ $this->id_settings['idgen_active'] = TRUE;
+ if(isset($_POST['idgen'])){
+ $this->id_settings['idgen'] = $_POST['idgen'];
+ }
+ }else{
+ $this->id_settings['idgen_active'] = FALSE;
+ }
+
/* Get password settings */
if(isset($_POST['pwdiffer_active'])){
$this->pwd_rules['pwdiffer_active'] = TRUE;
$this->pwd_rules['pwminlen_active'] = FALSE;
}
- /* Mail settings */
- if(isset($_POST['vacationdir_active'])){
- $this->mail_settings['vacationdir_active'] = TRUE;
- if(isset($_POST['vacationdir'])){
- $this->mail_settings['vacationdir'] = $_POST['vacationdir'];
- }
- }else{
- $this->mail_settings['vacationdir_active'] = FALSE;
- }
-
- /* Mail settings */
+ /* External pwd settings */
if(isset($_POST['externalpwdhook_active'])){
$this->pwd_rules['externalpwdhook_active'] = TRUE;
if(isset($_POST['externalpwdhook'])){
$this->pwd_rules['externalpwdhook_active'] = FALSE;
}
- /* Mail settings */
+ /* base hook settings */
if(isset($_POST['base_hook_active'])){
$this->pwd_rules['base_hook_active'] = TRUE;
if(isset($_POST['base_hook'])){
function get_attributes()
{
$tmp = setup_step::get_attributes();
- foreach(array("pwd_rules","mail_settings") as $attr){
+ foreach(array("pwd_rules","id_settings") as $attr){
$tmp[$attr]= $this->$attr;
}
return($tmp);