From: Daniel Berger Date: 2007-06-25T11:41:55+09:00 Subject: Re: Secondary user groups Gregory Brown wrote: > On 6/23/07, gga wrote: > >> > However, I need to obtain the list of ALL groups that a user belongs >> > to (primary and secondary). >> > Other than doing the unportable: >> > >> > groups = `groups #{user}`.split >> > >> > is there a method in the ruby std library to get the secondary groups? >> >> Never mind. Found how to do it. > > Well how did you do it? ;) Here's one way you could do it with sys-admin: groups = [] Admin.groups{ |g| groups << g.name if g.members.include?('you') } Regards, Dan