[rt-users] AdminClass right and RT-FM
Tim Cutts
tjrc at sanger.ac.uk
Fri Mar 27 11:20:09 EDT 2009
I'm in the process of deploying RT-FM, and I have come across a
strangeness with access to classes in order to configure them. We
have an rt-admin group, to which I have given the AdminClass right
globally.
However, when I go to the configure page for the classes, I (a member
of the rt-admin group) can only see one of the two classes that I have
created, and I don't understand why.
I tried to create a small perl script to examine the rights directly:
#!/usr/bin/perl -w
use strict;
use lib qw'/opt/rt3/lib /opt/rt3/local/lib';
use RT;
use RT::Interface::CLI qw/GetCurrentUser/;
RT::LoadConfig;
RT::Init;
my $user = GetCurrentUser();
my $c = RT::FM::Class->new($user);
$c->Load('someclassname');
if ($user->HasRight(Right => 'AdminClass',
Object => $c)) {
print "Yes we can\n";
}
but I'm not sure I've done this right, because it dies with:
Can't locate object method "new" via package "RT::FM::Class" (perhaps
you forgot to load "RT::FM::Class"?) at test.pl line 15, <DATA> line
273.
I've definitely got RT::FM in the @Plugins variable, so does anyone
have any clues as to (a) what I might have done wrong with the rights
in general and (b) why my little test script above does not work?
Thanks in advance,
Tim
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
More information about the rt-users
mailing list