[Rt-devel] Giving rights to Creator

Raed El-Hames rfh at vialtus.com
Fri Feb 19 07:29:57 EST 2010


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)
}


Regards;
Roy


Emmanuel Lacour wrote:
> Hi RT hackers,
>
> I'm trying to give rights ShowTicket/ReplyToTicket rights to the ticket
> creator.
>
> For this I add a quick check in Principal::_HasRight, but there seems to
> be somewhere (where??) a check that prevent me to get
> $args{'Object'}->Creator.
>
> Seems accessing ->Creator run HasRight, but I do not understand where.
>
> Any idea?
>
> _______________________________________________
> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>   


More information about the Rt-devel mailing list