SelfService 'by organization'

Hello,

consider the following situation: We have multiple external
unprivileged requestors that
belong to one client organization (identifiable by the organization
field in the user info). I’d like to show unprivileged users
belonging to one organization all tickets of all users in that
organization in the SelfService web UI.

I’d like to have some pointers how to implement this. My perl is a
bit rusty to say the least, but I think I can proceed with a little
prodding. Thanks in advance to all helpers!

Regards,
Harald

Harald Wagener
Technical Lead

Foote Cone & Belding
FCB Wilkens
An der Alster 42
20099 Hamburg
Germany

T: +49 (0)40 2881 1252
F: +49 (0)40 2881 1217
hwagener@hamburg.fcb.com
http://www.footeconebelding.de

Hi,

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com [mailto:rt-users-

consider the following situation: We have multiple external
unprivileged requestors that
belong to one client organization (identifiable by the organization
field in the user info). I’d like to show unprivileged users
belonging to one organization all tickets of all users in that
organization in the SelfService web UI.

I’ve been looking for a bit of the same thing about half a year ago, but ended up with an a bit alternative sollution which might not be ideal for you, but maybe.

What I do is I can make any user a “Domain Admin” meaning that all cases created from users in his domain (foobar.com) will have him added as a requestor and he will thus gain sufficient rights to see the case.

I’ve made a CF for Users called “Domain Admin”, then I made a global Scrip like this:

Condition: On Create
Action: User Defined
Template: Blank
Stage: TransactionCreate

Custom action preparation code:
my $email = $self->TransactionObj->CreatorObj->__Value(‘EmailAddress’);

$email =~ m/.*\@(.*)/;
my $emailDomain = $1;

my $users = new RT::Users($RT::SystemUser);

$users->LimitCustomField(
	CUSTOMFIELD => "7",
	OPERATOR => "=",
	VALUE => $emailDomain,
);

my $requestorlist = $self->TicketObj->Requestors;

while( my $user = $users->Next )
{
	$requestorlist->AddMember($user->id);	
 	$RT::Logger->info( "FindDomainAdmin scrip added ". $user->Name ." as a requestor!" );
}

Custom action cleanup code:
return 1;