Deon,
A good friend at work got this working.
He also added sorting so it's easier to find people in the lists.
With this enhancement, you can use the "Modify Group Members" function
with nisNetgroupTriple attributes.
Netgroups allow you to limit access to your ldap clients based on group
members.
The nisNetgroupTriple attribute contains the group members.
The syntax of the nisNetgroupTriple attribute is (,username,).
This enhancement enables the use of the modify_group_members
functionality when editing a nisNetgroup objects by adding the "(," and
",)" to each side of a username so that the necessary matching can be
done for the two lists ("Available Members" and "Group Members").
Would it be possible to include this patch into subsequent releases?
(Patch Below)
I'm not familiar with the patching process, so if there is another way I
should be submitting this patch, let me know.
And then to enable this feature, you would add "nisNetgroupTriple to the
following line in config.php:
$config->custom->modify_member['groupattr'] =
array('member','uniqueMember','memberUid','nisNetgroupTriple');
Thanks
-Josh
diff htdocs/modify_members_form.php_OLD
htdocs_modify_members_form.php_NEW
-------------------------------------
--- phpldapadmin-1.2.0.5/htdocs/modify_member_form.php_ORIGINAL
2010-01-30 00:21:20.000000000 -0500
+++ phpldapadmin-1.2.0.5/htdocs/modify_member_form.php_MODIFIED
2010-03-19 12:32:38.000000000 -0400
@@ -98,9 +98,25 @@
echo '<td>';
echo '<select name="notmembers" size="10" multiple>';
-foreach ($possible_members as $possible)
- printf('<option>%s</option>',$possible);
-
+switch ($request['attr']) {
+ case "nisnetgrouptriple":
+ sort($possible_members);
+ foreach ($possible_members as $possible) {
+ // Added for output formating
+ $matches = preg_split("/[=,]/", $possible);
+ $possible="(," . $matches[1] . ",)";
+ if(!in_array($possible, $current_members)) {
+ printf('<option>%s</option>',$possible); }
+ }
+ break;
+ case ("memberuid" || "member" || "uniquemember"):
+ sort($possible_members);
+ foreach ($possible_members as $possible) {
+ if(!in_array($possible, $current_members)) {
+ printf('<option>%s</option>',$possible); }
+ }
+ break;
+}
echo '</select>';
echo '</td>';
@@ -108,6 +124,7 @@
echo '<td>';
echo '<select name="members" size="10" multiple>';
+sort($current_members);
foreach ($current_members as $current)
printf('<option>%s</option>',$current);
-----------------------------------------
On Wed, 2010-02-10 at 08:22 -0500, Mullis, Josh (CCI-Atlanta) wrote:
> Thanks for the breakdown Kimmo.
>
> I think I can look at it with a better understanding now.
>
>
> I'll let you know.
>
> Thanks!
> -Josh
>
> ----- Original Message -----
> From: Kimmo Koivisto <koi...@gmail.com>
> To: phpldapadmin-users@lists.sourceforge.net
> <phpldapadmin-users@lists.sourceforge.net>; Mullis, Josh (CCI-Atlanta)
> Sent: Wed Feb 10 06:13:48 2010
> Subject: Re: [phpldapadmin-users] modify group members function enhancement
>
> Hello
>
> Yes, modify_member_form.php is where is't done and default
> configuration values can be found from lib/config_default.php, just
> search key word modify_member.
>
> I should know how to configure or fix this because I have implemented
> this feature, but I'm quite busy right now and I fear that I cannot
> help much. And there has been couple of years when I have last done
> anything with it :)
>
> Basically all it does is:
> - search all current members of group A ($current_members)
> - search all users with filter B ($possible_values)
> - show users C that do not belong to group A ($possible_members)
>
>
> Regards,
> Kimmo Koivisto
>
> 2010/2/3 Mullis, Josh (CCI - Atlanta) <josh.mul...@cox.com>:
> >
> >
> > Hi,
> >
> >
> > I'm trying to enhance the modify group members function to return a list of
> > users for the nisNetgroupTriple attribute.
> >
> > I successfully got the "modify group members" link to appear when a
> > nisNetgroupTriple attribute is present.
> > However it is displaying the members with a full dn, and all I want is the
> > "uid" like when editing a posixGroup object.
> >
> >
> >
> > In "htdocs/modify_member_form.php" is where I need to look I'm guessing...
> > I'm a bit confused though.
> >
> >
> > Can anyone help me with adding an exception to display the "uid" when
> > editing a "nisNetgroupTriple" attribute?
> >
> >
> >
> >
> > Using v1.2.0.5
> >
> >
> > Thanks
> > -Josh
> > ------------------------------------------------------------------------------
> > The Planet: dedicated and managed hosting, cloud storage, colocation
> > Stay online with enterprise data centers and the best network in the
> > business
> > Choose flexible plans and management services without long-term contracts
> > Personal 24x7 support from experience hosting pros just a phone call away.
> > http://p.sf.net/sfu/theplanet-com
> > _______________________________________________
> > phpldapadmin-users mailing list
> > phpldapadmin-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/phpldapadmin-users
> >
> >
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
phpldapadmin-users mailing list
phpldapadmin-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/phpldapadmin-users