From 554a085bcf752b273a816085926f864c0ae53379 Mon Sep 17 00:00:00 2001 From: duergner Date: Wed, 8 Sep 2004 17:39:06 +0000 Subject: [PATCH] help entries added; data is double in this->meta und in get_help() funktion --- lam/lib/modules/account.inc | 9 +++-- lam/lib/modules/inetOrgPerson.inc | 55 ++++++++++++++++++++++++--- lam/lib/modules/posixAccount.inc | 40 +++++++++++++++---- lam/lib/modules/posixGroup.inc | 34 ++++++++++++++++- lam/lib/modules/sambaGroupMapping.inc | 20 +++++++--- lam/lib/modules/shadowAccount.inc | 28 +++++++++++--- 6 files changed, 158 insertions(+), 28 deletions(-) diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index e2086ef4..1f12c8b7 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -54,6 +54,8 @@ class account extends baseModule { $return['dependencies'] = array('depends' => array(), 'conflicts' => array('inetOrgPerson')); // available PDF fields $return['PDF_fields'] = array('description'); + // help Entries + $return['help'] = array ( 'description' => array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Host description. If left empty host name will be used."))); return $return; } @@ -106,12 +108,11 @@ class account extends baseModule { function get_help($id) { switch ($id) { case "description": - return array ("ext" => "FALSE", "Headline" => _("Description"), - "Text" => _("Host Description.")); + return array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Host description. If left empty host name will be used.")); break; - } - return false; } + return false; + } /* This function returns all ldap attributes * which are part of account and returns diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 3d44d721..36af8915 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -101,6 +101,19 @@ class inetOrgPerson extends baseModule { 'mobileTelephoneNumber', 'facimilieTelefonNumber', 'mail'); + // help Entries + $return['help'] = array ( 'description' => array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Host description. If left empty host name will be used.")), + 'title' => array ("ext" => "FALSE", "Headline" => _("Title"), "Text" => _("Title of user, Mr., Ms., ...")), + 'givenName' => array ("ext" => "FALSE", "Headline" => _("Given name"), "Text" => _("Given name of user. Only letters, - and spaces are allowed.")), + 'sn' => array ("ext" => "FALSE", "Headline" => _("Surname"), "Text" => _("Surname of user. Only letters, - and spaces are allowed.")), + 'employeeType' => array ("ext" => "FALSE", "Headline" => _("Employee type"), "Text" => _("Employee type: worker, student, nurse, ...")), + 'street' => array ("ext" => "FALSE", "Headline" => _("Street"), "Text" => _("Street")), + 'postalCode' => array ("ext" => "FALSE", "Headline" => _("Postal code"), "Text" => _("Postal code")), + 'postalAddress' => array ("ext" => "FALSE", "Headline" => _("Postal address"), "Text" => _("Postal address, city")), + 'telephoneNumber' => array ("ext" => "FALSE", "Headline" => _("Telephone number"), "Text" => _("Telephone number")), + 'mobileTelephoneNumber' => array ("ext" => "FALSE", "Headline" => _("Mobile number"), "Text" => _("Mobile number")), + 'facsimileTelephoneNumber' => array ("ext" => "FALSE", "Headline" => _("Fax number"), "Text" => _("Fax number")), + 'mail' => array ("ext" => "FALSE", "Headline" => _("eMail address"), "Text" => _("eMail address"))); return $return; } @@ -185,13 +198,45 @@ class inetOrgPerson extends baseModule { */ function get_help($id) { switch ($id) { - case "description": - return array ("ext" => "FALSE", "Headline" => _("Description"), - "Text" => _("Host Description.")); + case 'description': + return array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Host description. If left empty host name will be used.")); + break; + case 'title': + return array ("ext" => "FALSE", "Headline" => _("Title"), "Text" => _("Title of user, Mr., Ms., ...")); + break; + case 'givenName': + return array ("ext" => "FALSE", "Headline" => _("Given name"), "Text" => _("Given name of user. Only letters, - and spaces are allowed.")); + break; + case 'sn': + return array ("ext" => "FALSE", "Headline" => _("Surname"), "Text" => _("Surname of user. Only letters, - and spaces are allowed.")); + break; + case 'employeeType': + return array ("ext" => "FALSE", "Headline" => _("Employee type"), "Text" => _("Employee type: worker, student, nurse, ...")); + break; + case 'street': + return array ("ext" => "FALSE", "Headline" => _("Street"), "Text" => _("Street")); + break; + case 'postalCode': + return array ("ext" => "FALSE", "Headline" => _("Postal code"), "Text" => _("Postal code")); + break; + case 'postalAddress': + return array ("ext" => "FALSE", "Headline" => _("Postal address"), "Text" => _("Postal address, city")); + break; + case 'telephoneNumber': + return array ("ext" => "FALSE", "Headline" => _("Telephone number"), "Text" => _("Telephone number")); + break; + case 'mobileTelephoneNumber': + return array ("ext" => "FALSE", "Headline" => _("Mobile number"), "Text" => _("Mobile number")); + break; + case 'facsimileTelephoneNumber': + return array ("ext" => "FALSE", "Headline" => _("Fax number"), "Text" => _("Fax number")); + break; + case 'mail': + return array ("ext" => "FALSE", "Headline" => _("eMail address"), "Text" => _("eMail address")); break; - } - return false; } + return false; + } /* This function returns all ldap attributes * which are part of inetOrgPerson and returns diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index 2b3f97fa..08bacfb5 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -156,7 +156,7 @@ class posixAccount extends baseModule { 'addgroup' => array ("ext" => "FALSE", "Headline" => _("Additional groups"), "Text" => _("Hold the CTRL-key to (de)select multiple groups."). ' '. _("Can be left empty.")), 'homeDirectory' => array ("ext" => "FALSE", "Headline" => _("Home directory"), "Text" => _("$user and $group are replaced with username or primary groupname.")), /*'userPassword' =>*/ - /*'userPassword_no' =>*/ + 'userPassword_no' => array ("ext" => "FALSE", "Headline" => _("Use no password"), "Text" => _("If checked no password will be used.")), /*'userPassword_lock' =>*/ 'loginShell' => array ("ext" => "FALSE", "Headline" => _("Login shell"), "Text" => _("To disable login use /bin/false. List of shells is read from lam/config/shells"))); @@ -260,15 +260,41 @@ class posixAccount extends baseModule { /* */ - /*function get_help($id) { + function get_help($id) { switch ($id) { - case "description": - return array ("ext" => "FALSE", "Headline" => _("Description"), - "Text" => _("Host Description.")); + case 'uid': + return array ("ext" => "FALSE", "Headline" => _("Username"), "Text" => _("Username of the user who should be created. Valid characters are: a-z,0-9, .-_. Lam does not allow a number as first character because useradd also does not allow it. Lam does not allow capital letters A-Z because it can cause several problems. If username is already used username will be expanded with a number. The next free number will be used. Warning: Older systems have problems with usernames longer than 8 characters. You can not log in to Windows if username is longer than 16 characters.")); break; - } + case 'uidNumber': + return array ("ext" => "FALSE", "Headline" => _("UID number"), "Text" => _("If empty UID number will be generated automaticly.")); + break; + case 'gecos': + return array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("User description. If left empty sur- and give name will be used.")); + break; + case 'gidNumber': + return array ("ext" => "FALSE", "Headline" => _("Primary group"), "Text" => _("The Primary Group the user should be member of.")); + break; + case 'addgroup': + return array ("ext" => "FALSE", "Headline" => _("Additional groups"), "Text" => _("Hold the CTRL-key to (de)select multiple groups."). ' '. _("Can be left empty.")); + break; + case 'homeDirectory': + return array ("ext" => "FALSE", "Headline" => _("Home directory"), "Text" => _("$user and $group are replaced with username or primary groupname.")); + break; + /*case 'userPassword': + return ;*/ + break; + case 'userPassword_no': + return array ("ext" => "FALSE", "Headline" => _("Use no password"), "Text" => _("If checked no password will be used.")); + break; + /*case 'userPassword_lock': + return ;*/ + break; + case 'loginShell': + return array ("ext" => "FALSE", "Headline" => _("Login shell"), "Text" => _("To disable login use /bin/false. List of shells is read from lam/config/shells")); + break; + } return false; - }*/ + } /* This function returns all ldap attributes * which are part of posixAccount and returns diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index c8366e11..ae937c89 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -164,6 +164,15 @@ class posixGroup extends baseModule { 'required' => false ) ); + // help Entries + $return['help'] = array ( 'cn' => array ("ext" => "FALSE", "Headline" => _("Groupname"), "Text" => _("Group name of the group which should be created. Valid characters are: a-z,0-9, .-_. Lam does not allow a number as first character because groupadd also does not allow it. Lam does not allow capital letters A-Z because it can cause several problems. If groupname is already used groupname will be expanded with a number. The next free number will be used.")), + 'gidNumber' => array ("ext" => "FALSE", "Headline" => _("GID number"), "Text" => _("If empty GID number will be generated automaticly depending on your configuration settings.")), + 'description' => array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Group description. If left empty group name will be used.")), + 'adduser' => array ("ext" => "FALSE", "Headline" => _("Group members"), "Text" => _("Users also being member of the current group."). ' '. _("Can be left empty.")), + /*'userPassword' => */ + 'userPassword_no' => array ("ext" => "FALSE", "Headline" => _("Use no password"), "Text" => _("If checked no password will be used."))/*,*/ + /*'userPassword_lock' => */); + return $return; } @@ -256,9 +265,30 @@ class posixGroup extends baseModule { return array ("ext" => "FALSE", "Headline" => _("Description"), "Text" => _("Host Description.")); break; - } - return false; + case 'cn': + return array ("ext" => "FALSE", "Headline" => _("Groupname"), "Text" => _("Group name of the group which should be created. Valid characters are: a-z,0-9, .-_. Lam does not allow a number as first character because groupadd also does not allow it. Lam does not allow capital letters A-Z because it can cause several problems. If groupname is already used groupname will be expanded with a number. The next free number will be used.")); + break; + case 'gidNumber': + return array ("ext" => "FALSE", "Headline" => _("GID number"), "Text" => _("If empty GID number will be generated automaticly depending on your configuration settings.")); + break; + case 'description': + return array ("ext" => "FALSE", "Headline" => _("Gecos"), "Text" => _("Group description. If left empty group name will be used.")); + break; + case 'adduser': + return array ("ext" => "FALSE", "Headline" => _("Group members"), "Text" => _("Users also being member of the current group."). ' '. _("Can be left empty.")); + break; + /*case 'userPassword': + return ; + break;*/ + case 'userPassword_no': + return array ("ext" => "FALSE", "Headline" => _("Use no password"), "Text" => _("If checked no password will be used.")); + break; + /*case 'userPassword_lock': + return ; + break;*/ } + return false; + } /* This function returns all ldap attributes * which are part of posixGroup and returns diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index f1fefde2..4708779e 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -97,6 +97,11 @@ class sambaGroupMapping extends baseModule { 'required' => false ) ); + // help Entries + $return['help'] = array ( 'displayName' => array ("ext" => "FALSE", "Headline" => _("Display name"), "Text" => _("Windows clients will show display name as group description.")), + 'sambaSID' => array ("ext" => "FALSE", "Headline" => _("Windows groupname"), "Text" => _("If you want to use a well known RID you can selcet a well known group.")), + 'sambaDomainName' => array ("ext" => "FALSE", "Headline" => _("Domain"), "Text" => _("Windows-Domain of group."). ' '. _("Can be left empty."))); + return $return; } @@ -161,13 +166,18 @@ class sambaGroupMapping extends baseModule { */ function get_help($id) { switch ($id) { - case "description": - return array ("ext" => "FALSE", "Headline" => _("Description"), - "Text" => _("Host Description.")); + case 'displayName': + return array ("ext" => "FALSE", "Headline" => _("Display name"), "Text" => _("Windows clients will show display name as group description.")); + break; + case 'sambaSID': + return array ("ext" => "FALSE", "Headline" => _("Windows groupname"), "Text" => _("If you want to use a well known RID you can selcet a well known group.")); + break; + case 'sambaDomainName': + return array ("ext" => "FALSE", "Headline" => _("Domain"), "Text" => _("Windows-Domain of group."). ' '. _("Can be left empty.")); break; - } - return false; } + return false; + } /* This function returns all ldap attributes * which are part of sambaGroupMapping and returns diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index 7a10259f..cb9a88c4 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -142,6 +142,13 @@ class shadowAccount extends baseModule { 'shadowExpire', 'shadowFlag', 'description'); + // help Entries + $return['help'] = array ( 'shadowWarning' => array ("ext" => "FALSE", "Headline" => _("Password warn"), "Text" => _("Days before password is to expire that user is warned of pending password expiration. If set value must be 0<."). ' '. _("Can be left empty.")), + 'shadowInactive' => array ("ext" => "FALSE", "Headline" => _("Password expire"), "Text" => _("Number of days a user can login even his password has expired. -1=always."). ' '. _("Can be left empty.")), + 'shadowMin' => array ("ext" => "FALSE", "Headline" => _("Minimum password age"), "Text" => _("Number of days a user has to wait until he\'s allowed to change his password again. If set value must be 0<."). ' '. _("Can be left empty.")), + 'shadowMax' => array ("ext" => "FALSE", "Headline" => _("Maximum password age"), "Text" => _("Number of days after a user has to change his password again. If set value must be 0<."). ' '. _("Can be left empty.")), + 'shadowExpire' => array ("ext" => "FALSE", "Headline" => _("Expire date"), "Text" => _("Account expire date. Format: DD-MM-YYYY"))); + return $return; } @@ -204,13 +211,24 @@ class shadowAccount extends baseModule { */ function get_help($id) { switch ($id) { - case "description": - return array ("ext" => "FALSE", "Headline" => _("Description"), - "Text" => _("Host Description.")); + case 'shadowWarning': + return array ("ext" => "FALSE", "Headline" => _("Password warn"), "Text" => _("Days before password is to expire that user is warned of pending password expiration. If set value must be 0<."). ' '. _("Can be left empty.")); + break; + case 'shadowInactive': + return array ("ext" => "FALSE", "Headline" => _("Password expire"), "Text" => _("Number of days a user can login even his password has expired. -1=always."). ' '. _("Can be left empty.")); + break; + case 'shadowMin': + return array ("ext" => "FALSE", "Headline" => _("Minimum password age"), "Text" => _("Number of days a user has to wait until he\'s allowed to change his password again. If set value must be 0<."). ' '. _("Can be left empty.")); + break; + case 'shadowMax': + return array ("ext" => "FALSE", "Headline" => _("Maximum password age"), "Text" => _("Number of days after a user has to change his password again. If set value must be 0<."). ' '. _("Can be left empty.")); + break; + case 'shadowExpire': + return array ("ext" => "FALSE", "Headline" => _("Expire date"), "Text" => _("Account expire date. Format: DD-MM-YYYY")); break; - } - return false; } + return false; + } /* This function returns all ldap attributes * which are part of shadowAccount and returns