[Rt-devel] Giving rights to Creator

Emmanuel Lacour elacour at easter-eggs.com
Fri Feb 19 08:29:00 EST 2010


On Fri, Feb 19, 2010 at 12:29:57PM +0000, Raed El-Hames wrote:
> Hi Emmanuel;
>
> I am guessing its rt-3.8.x ??
> What have you done so far? I am guessing with _HasRight sub you did
> %args = @_ ;
>
> Then I would suggest at the top of _HasRight above
> {
>        my ($hit, @other) = $self->_HasGroupRight( @_ );
>
>
> You intercept it and do:
> if ( $args{Object}{'_Class'} eq 'RT::Ticket' and $args{Right} =~  
> /(ReplyTo|Show)Ticket/) {
>    return (1)  if ($args{Object}->Creator == $self->CurrentUser->id)
> }
>
>

That's about what I did (a little bit more complicate as I also handle
rights with customfields ;)). But If you try what you wrote above, you
will find that calling $args{Object}->Creator trigger an infinite loop...



More information about the Rt-devel mailing list