From 0b65747110471938a8f7f3df599b2c4dd0e825d6 Mon Sep 17 00:00:00 2001 From: JamesCordell Date: Wed, 19 Feb 2020 22:17:37 +0000 Subject: [PATCH] Changes required so the sudoRole objectClass will present a link so members can be modified by default. (#101) --- config/config.php.example | 3 ++- htdocs/modify_member_form.php | 2 +- lib/config_default.php | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/config.php.example b/config/config.php.example index c9dcd70..b7bcd27 100644 --- a/config/config.php.example +++ b/config/config.php.example @@ -235,7 +235,7 @@ $config->custom->appearance['friendly_attrs'] = array( *********************************************/ /* Add "modify group members" link to the attribute. */ -// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid'); +// $config->custom->modify_member['groupattr'] = array('member','uniqueMember','memberUid','sudoUser'); /* Configure filter for member search. This only applies to "modify group members" feature */ // $config->custom->modify_member['filter'] = '(objectclass=Person)'; @@ -243,6 +243,7 @@ $config->custom->appearance['friendly_attrs'] = array( /* Attribute that is added to the group member attribute. */ // $config->custom->modify_member['attr'] = 'dn'; + /* For Posix attributes */ // $config->custom->modify_member['posixattr'] = 'uid'; // $config->custom->modify_member['posixfilter'] = '(uid=*)'; diff --git a/htdocs/modify_member_form.php b/htdocs/modify_member_form.php index 208b9ef..a3e4d09 100644 --- a/htdocs/modify_member_form.php +++ b/htdocs/modify_member_form.php @@ -65,7 +65,7 @@ for ($i=0;$igetValue('modify_member','posixgroupattr'))) $possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','posixattr')][0]; else - $possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','attr')]; + $possible_members[$i] = $possible_values[$i][$_SESSION[APPCONFIG]->getValue('modify_member','attr')][0]; } # Show only user that are not already in group. diff --git a/lib/config_default.php b/lib/config_default.php index d85140f..4d77cf8 100644 --- a/lib/config_default.php +++ b/lib/config_default.php @@ -444,7 +444,7 @@ class Config { */ $this->default->modify_member['groupattr'] = array( 'desc'=>'Group member attributes', - 'default'=>array('member','uniqueMember','memberUid')); + 'default'=>array('member','uniqueMember','memberUid','uid')); /** * Attribute that is added to the group member attribute. For groupOfNames or groupOfUniqueNames this is dn,