[rt-users] Interface::CLI and Queue auto-create

Jens Porup jens at cyber.com.au
Tue Sep 7 02:58:13 EDT 2004


On Tue, Sep 07, 2004 at 12:46:20PM +1000, Jens Porup wrote:
> 	my $nq = new RT::Queue($CurrentUser);
> 
> 	$nq->Create({       Name => "FOOOOOOOOOOOOO",
> 						Description =>  "testdesc",
> 						CorrespondAddress => "foo",
> 						CommentAddress => "bar",
> 						InitialPriority => "12",
> 						FinalPriority => "43"
> 				});
> 

OK, so I change that bit there to:

	my ($id, $err) = $nq->Create({  Name => "FOOOOOOOOOOOOO",
									Description =>  "testdesc",
									CorrespondAddress => "foo",
									CommentAddress => "bar",
									InitialPriority => "12",
									FinalPriority => "43"
								}) or warn "Create failed\n"; #warn doesn't do anything...

	print STDERR "$err\n" if $err;

Which gives me:

	station:~# perl foo.pl
	Queue could not be created

and when I print the value of $CurrentUser 's id:

	print STDERR "User id is: " . $CurrentUser->PrincipalId() . "\n";

I get '12'--which the database tells me is root.

But if I'm root, how come I don't have permissions to autocreate queues?

Jens





More information about the rt-users mailing list