[rt-users] Determining Group Membership
Andy Harrison
ah3 at mlz.us
Thu Dec 18 15:06:14 EST 2003
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'd like to make my custom ticket creation for automatically turn on
SELECTED for the a particular group in the Group listbox.
perldoc Users_Overlay cites:
MemberOfGroup PRINCIPAL_ID
takes one argument, a group's principal id. Limits the
returned set to members of a given group
So I tried adding this to INIT:
use RT::Users
my $UserObj = new RT::Users($session{'CurrentUser'});
and this to the main portion of the form:
% print "<br /><pre>\n:::", $UserObj->MemberOfGroup(336), ":::</pre><br />\n";
It prints out :::CachedGroupMembers_2:::
I also tried:
user RT::Group;
my $GroupObj = new RT::Group($session{'CurrentUser'});
% print "<br /><pre>\n:::", $GroupObj->MembersObj(336), " :::</pre><br />\n";
Which returns:
:::RT::GroupMembers=HASH(0x96d4e28):::
I've verified that this *is* the group id I'm looking for:
rt3=# select * from groups where id = '336';
id | name | description | domain | type | instance
- -----+--------+--------------------+-------------+------+----------
336 | SysOps | Systems Operations | UserDefined | |
(1 row)
rt3=# select * from principals where id = '336';
id | principaltype | objectid | disabled
- -----+---------------+----------+----------
336 | Group | 336 | 0
(1 row)
Could anyone shed any light on how to do this?
Thanx!
- --
Andy Harrison
(full headers for details)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/4gi2CYaHi6DasBoRAsMHAJ4+LEeGphSdOFzpvTo6LozP2fYN8gCgjf2O
jiRnMmUj2dbSOxqVufENKrk=
=2zGV
-----END PGP SIGNATURE-----
More information about the rt-users
mailing list