[rt-users] SelfService 'by organization'

Bjørn Skovlund Rydén bear at 247ms.com
Tue Mar 14 07:56:41 EST 2006


Hi,

> -----Original Message-----
> From: rt-users-bounces at 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;



More information about the rt-users mailing list