How to know which users I am in

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

We have a small RT installation in-house and some other groups (besides
Technology) are starting to use it. At the moment we have a small HTML
fragment that displays the amounts of tickets each user in our group has
opened and closed (some sort of ranking table) :wink:

This HTML fragment has a hardcoded GroupID :frowning: (I know … bad bad bad).
I want to show the list of users with their matching tickets for the
group that the “viewing user” is in … So if I am in Technology and
Business for example, the list will contain all the users that are in
both groups.

In my <%INIT> block I have the following:

my $Groups = new RT::Groups($session{‘CurrentUser’});
$Groups->LimitToUserDefinedGroups();

But this lists ALL the UserDefinedGroups … How do I get only the
groups the CurrentUser is a member of?

Thanks in advance,

/B


Bruno Mattarollo bruno.mattarollo@rsp.com.au
Systems Administrator - Sydney
GnuPG: 65A6 C94A 1978 9B42 6ED2 FBCE 1BD2 756B 3A80 D8FC


Rising Sun Pictures - [ http://www.rsp.com.au/ ]
redefining visual effects delivery


syd - ph +61 2 9338 6400 - fx +61 2 9338 6401
adl - ph +61 8 8400 6400 - fx +61 8 7421 6401


rising sun research - http://research.rsp.com.au
cineSpace color management solutions for film
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCrl/xG9J1azqA2PwRArzzAKDUFtthmYTClX96YIiuVJRID1IhbACglg3A
XoNGMO9BNbnbN86J0+bah/Q=
=vzdm
-----END PGP SIGNATURE-----

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Answering my own question:

$Groups->WithMember(PrincipalId => $session{‘CurrentUser’}->Id);

Sorry for this post … :slight_smile:

/B

Bruno Mattarollo wrote:

Hello,

We have a small RT installation in-house and some other groups (besides
Technology) are starting to use it. At the moment we have a small HTML
fragment that displays the amounts of tickets each user in our group has
opened and closed (some sort of ranking table) :wink:

This HTML fragment has a hardcoded GroupID :frowning: (I know … bad bad bad).
I want to show the list of users with their matching tickets for the
group that the “viewing user” is in … So if I am in Technology and
Business for example, the list will contain all the users that are in
both groups.

In my <%INIT> block I have the following:

my $Groups = new RT::Groups($session{‘CurrentUser’});
$Groups->LimitToUserDefinedGroups();

But this lists ALL the UserDefinedGroups … How do I get only the
groups the CurrentUser is a member of?

Thanks in advance,

/B

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT Wiki at http://wiki.bestpractical.com


Bruno Mattarollo bruno.mattarollo@rsp.com.au
Systems Administrator - Sydney
GnuPG: 65A6 C94A 1978 9B42 6ED2 FBCE 1BD2 756B 3A80 D8FC


Rising Sun Pictures - [ http://www.rsp.com.au/ ]
redefining visual effects delivery


syd - ph +61 2 9338 6400 - fx +61 2 9338 6401
adl - ph +61 8 8400 6400 - fx +61 8 7421 6401


rising sun research - http://research.rsp.com.au
cineSpace color management solutions for film
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFCrmhPG9J1azqA2PwRAo9UAJ0dnzH3gC/9NeLPkG0Bh28SkmPIOwCcCYzx
1pnh5yo7CY9PRSIcGUIlQbQ=
=X2oM
-----END PGP SIGNATURE-----