[Rt-devel] Refactoring RT::Principal::HasRight
Todd Chapman
todd at chaka.net
Tue Apr 5 18:51:45 EDT 2005
Jesse and mysterious others,
I designing AssetTracker I have found it necessary to subclass
RT::Principal, RT::User, and RT::Group. Much of this revolves
around the fact that RT::Principal::HasRight has bits of
code such as this:
if ( ( ref( $args{'Object'} ) eq 'RT::Ticket' ) && $args{'Object'}->Id ) {
push( @{ $args{'EquivObjects'} }, $args{'Object'}->QueueObj );
}
and this:
push( @look_at_objects, "ACL.ObjectType = 'RT::System'" )
unless $self->can('_IsOverrideGlobalACL')
and $self->_IsOverrideGlobalACL( $args{Object} );
which does not work well if the Object is part of the RTx::AssetTracker::System.
What I would like to do is update HasRight to query the object
for these values instead of hard-coding them. This should help
simplify the AT design and future RTx modules.
How do you feel about this?
-Todd
More information about the Rt-devel
mailing list