[rt-users] AdminClass right and RT-FM
Kevin Falcone
falcone at bestpractical.com
Fri Mar 27 11:46:26 EDT 2009
On Mar 27, 2009, at 11:20 AM, Tim Cutts wrote:
> 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.
There is also a SeeClass right you might want to grant.
> 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.
you need to use RT::FM::Class; before you call new on it
-kevin
>
>
> 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.
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>
More information about the rt-users
mailing list