[Rt-devel] Proposed change to RT::Principal::HasRight

Todd Chapman todd at chaka.net
Tue Oct 11 16:32:18 EDT 2005


On Tue, Oct 11, 2005 at 04:40:20PM -0400, Jesse Vincent wrote:
> 
> > Is there a better way to do this or should I write, test, and
> > submit a patch?
> 
> Start with a test script showing the proposed API?

Is this what you mean, or something more?

# check if user has right based on group membership
if $principal->HasRight(Right => 'ShowTicket', Object => $queue,
                        Domain => [ 'UserDefined' ] );

# check if user has right directly
if $principal->HasRight(Right => 'ShowTicket', Object => $queue,
                        Domain => [ 'ACLEquivalence' ] );


More information about the Rt-devel mailing list