[Rt-commit] r7593 - in rt/branches/3.7-EXPERIMENTAL: .
jesse at bestpractical.com
jesse at bestpractical.com
Fri Apr 20 15:49:37 EDT 2007
Author: jesse
Date: Fri Apr 20 15:49:36 2007
New Revision: 7593
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/Principal_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
Log:
r55795 at pinglin: jesse | 2007-04-20 15:34:31 -0400
* Created a hook to let me drop in crazy ACL equivalence objects on tickets.
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Principal_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Principal_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Principal_Overlay.pm Fri Apr 20 15:49:36 2007
@@ -320,11 +320,13 @@
# If this object is a ticket, we care about ticket roles and queue roles
if ( UNIVERSAL::isa( $args{'Object'} => 'RT::Ticket' ) ) {
+
+
# this is a little bit hacky, but basically, now that we've done
# the ticket roles magic, we load the queue object
# and ask all the rest of our questions about the queue.
- push( @{ $args{'EquivObjects'} }, $args{'Object'}->QueueObj );
+ push( @{ $args{'EquivObjects'} }, $args{'Object'}->ACLEquivalenceObjects);
}
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm Fri Apr 20 15:49:36 2007
@@ -3845,6 +3845,23 @@
"RT::Queue-RT::Ticket";
}
+=head2 ACLEquivalenceObjects
+
+This method returns a list of objects for which a user's rights also apply
+to this ticket. Generally, this is only the ticket's queue, but some RT
+extensions may make other objects availalbe too.
+
+This method is called from L<RT::Principal/HasRight>.
+
+=cut
+
+sub ACLEquivalenceObjects {
+ my $self = shift;
+ return $self->QueueObj;
+
+}
+
+
1;
=head1 AUTHOR
More information about the Rt-commit
mailing list