From 03d4b4ecf45373c3000631fd05a7333a9974c0d0 Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Tue, 9 Mar 2004 12:03:39 +0000 Subject: [PATCH] added dummy getProfileOptions() functions --- lam/lib/modules/account.inc | 4 ++++ lam/lib/modules/inetOrgPerson.inc | 5 +++++ lam/lib/modules/posixAccount.inc | 9 +++++++++ lam/lib/modules/posixGroup.inc | 8 ++++++++ lam/lib/modules/quota.inc | 5 +++++ lam/lib/modules/sambaAccount.inc | 8 ++++++++ lam/lib/modules/sambaGroupMapping.inc | 9 +++++++++ lam/lib/modules/sambaSamAccount.inc | 9 +++++++++ lam/lib/modules/shadowAccount.inc | 17 +++++++++++++++++ 9 files changed, 74 insertions(+) diff --git a/lam/lib/modules/account.inc b/lam/lib/modules/account.inc index 5ab85a12..31e3fcd0 100644 --- a/lam/lib/modules/account.inc +++ b/lam/lib/modules/account.inc @@ -198,6 +198,10 @@ class account { return 0; } + function get_profileOptions($scope) { + if ($scope == "host") return array(); } +} + ?> diff --git a/lam/lib/modules/inetOrgPerson.inc b/lam/lib/modules/inetOrgPerson.inc index 517d4d0b..ef3ec8be 100644 --- a/lam/lib/modules/inetOrgPerson.inc +++ b/lam/lib/modules/inetOrgPerson.inc @@ -302,6 +302,11 @@ class inetOrgPerson { function display_html_delete($post, $profile=false) { return 0; } + + function get_profileOptions($scope) { + if ($scope == "user") return array(); } +} + ?> diff --git a/lam/lib/modules/posixAccount.inc b/lam/lib/modules/posixAccount.inc index e0be8fb3..f1602d73 100644 --- a/lam/lib/modules/posixAccount.inc +++ b/lam/lib/modules/posixAccount.inc @@ -669,6 +669,15 @@ class posixAccount { } + function get_profileOptions($scope) { + $return = array(); + // TODO fill in correct groups + $return[] = array (0 => array ('kind' => 'text', 'text' => _('Primary group')), + 1 => array ('kind' => 'select', 'name' => 'gidNumber', 'options' => array('g1', 'g2', 'g3'), 'options_selected' => array(), 'size' => 1), + 2 => array ('kind' => 'help', 'value' => 'gidNumber')); + return $return; } +} + ?> diff --git a/lam/lib/modules/posixGroup.inc b/lam/lib/modules/posixGroup.inc index 2db43259..a298c2b0 100644 --- a/lam/lib/modules/posixGroup.inc +++ b/lam/lib/modules/posixGroup.inc @@ -585,6 +585,14 @@ class posixGroup { return $return; } + function get_profileOptions($scope) { + $return = array(); + $return[] = array (0 => array ( 'kind' => 'text', 'text' => _("Groupname")), + 1 => array ('kind' => 'input', 'name' => 'cn', 'type' => 'text', 'size' => '20', 'maxlength' => '20'), + 2 => array ('kind' => 'help', 'value' => 'cn')); + return $return; } +} + ?> diff --git a/lam/lib/modules/quota.inc b/lam/lib/modules/quota.inc index 49f75514..7610da04 100644 --- a/lam/lib/modules/quota.inc +++ b/lam/lib/modules/quota.inc @@ -293,6 +293,11 @@ class quota { return 0; } + function get_profileOptions($scope) { + $return = array(); + return $return; } +} + ?> diff --git a/lam/lib/modules/sambaAccount.inc b/lam/lib/modules/sambaAccount.inc index a0864ed3..4662212f 100644 --- a/lam/lib/modules/sambaAccount.inc +++ b/lam/lib/modules/sambaAccount.inc @@ -606,6 +606,14 @@ class sambaAccount { return $return; } + function get_profileOptions($scope) { + $return = array(); + $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Domain') ), + 1 => array ( 'kind' => 'input', 'type' => 'text', 'name' => 'domain', 'size' => '20', 'maxlength' => '255', 'value' => $this->attributes['domain'][0]), + 2 => array ( 'kind' => 'help', 'value' => 'domain' )); + return $return; } +} + ?> diff --git a/lam/lib/modules/sambaGroupMapping.inc b/lam/lib/modules/sambaGroupMapping.inc index 340c5c6e..66a71fec 100644 --- a/lam/lib/modules/sambaGroupMapping.inc +++ b/lam/lib/modules/sambaGroupMapping.inc @@ -305,6 +305,15 @@ class sambaGroupMapping { return 0; } + function get_profileOptions($scope) { + $return = array(); + // TODO fill in correct domains + $return[] = array (0 => array ('kind' => 'text', 'text' => _('Domain')), + 1 => array ('kind' => 'select', 'name' => 'sambaDomainName', 'options' => $sambaDomainNames), + 2 => array ('kind' => 'help', 'value' => 'sambaDomainName' )); + return $return; } +} + ?> diff --git a/lam/lib/modules/sambaSamAccount.inc b/lam/lib/modules/sambaSamAccount.inc index ae9bf0d4..56800108 100644 --- a/lam/lib/modules/sambaSamAccount.inc +++ b/lam/lib/modules/sambaSamAccount.inc @@ -621,6 +621,15 @@ class sambaSamAccount { return $return; } + function get_profileOptions($scope) { + $return = array(); + // TODO fill in correct groups + $return[] = array(0 => array('kind' => 'text', 'text' => _('Domain')), + 1 => array('kind' => 'select', 'name' => 'sambaDomainName', 'options' => $sambaDomainNames), + 2 => array('kind' => 'help', 'value' => 'sambaDomainName' )); + return $return; } +} + ?> diff --git a/lam/lib/modules/shadowAccount.inc b/lam/lib/modules/shadowAccount.inc index d56d420a..15168546 100644 --- a/lam/lib/modules/shadowAccount.inc +++ b/lam/lib/modules/shadowAccount.inc @@ -256,6 +256,23 @@ class shadowAccount { return 0; } + function get_profileOptions($scope) { + $return = array(); + $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password warn') ), + 1 => array ( 'kind' => 'input', 'name' => 'shadowWarning', 'type' => 'text', 'size' => '4', 'maxlength' => '4', 'value' => $this->attributes['shadowWarning'][0] ), + 2 => array ( 'kind' => 'help', 'value' => 'shadowWarning' )); + $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Password expire') ), + 1 => array ( 'kind' => 'input', 'name' => 'shadowInactive', 'type' => 'text', 'size' => '4', 'maxlength' => '4', 'value' => $this->attributes['shadowInactive'][0] ), + 2 => array ( 'kind' => 'help', 'value' => 'shadowInactive' )); + $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Maximum password age') ), + 1 => array ( 'kind' => 'input', 'name' => 'shadowMax', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $this->attributes['shadowMax'][0] ), + 2 => array ( 'kind' => 'help', 'value' => 'shadowMax' )); + $return[] = array ( 0 => array ( 'kind' => 'text', 'text' => _('Minimum password age') ), + 1 => array ( 'kind' => 'input', 'name' => 'shadowMin', 'type' => 'text', 'size' => '5', 'maxlength' => '5', 'value' => $this->attributes['shadowMin'][0] ), + 2 => array ( 'kind' => 'help', 'value' => 'shadowMin' )); + return $return; } +} + ?>