[Rt-commit] r10315 - in rt/branches/3.7-EXPERIMENTAL: .
ruz at bestpractical.com
ruz at bestpractical.com
Sun Jan 13 17:52:33 EST 2008
Author: ruz
Date: Sun Jan 13 17:52:33 2008
New Revision: 10315
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm
rt/branches/3.7-EXPERIMENTAL/lib/RT/Ticket_Overlay.pm
Log:
r10139 at cubic-pc: cubic | 2008-01-06 04:51:05 +0300
* use new API to get a little bit of effectivness
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/CachedGroupMember_Overlay.pm Sun Jan 13 17:52:33 2008
@@ -215,7 +215,7 @@
# Unless $self->GroupObj still has the member recursively $self->MemberObj
# (Since we deleted the database row above, $self no longer counts)
- unless ( $self->GroupObj->Object->HasMemberRecursively( $self->MemberObj ) ) {
+ unless ( $self->GroupObj->Object->HasMemberRecursively( $self->MemberId ) ) {
# Find all ACEs granted to $self->GroupId
@@ -286,7 +286,7 @@
# Unless $self->GroupObj still has the member recursively $self->MemberObj
# (Since we SetDisabledd the database row above, $self no longer counts)
- unless ( $self->GroupObj->Object->HasMemberRecursively( $self->MemberObj ) ) {
+ unless ( $self->GroupObj->Object->HasMemberRecursively( $self->MemberId ) ) {
# Find all ACEs granted to $self->GroupId
my $acl = RT::ACL->new($RT::SystemUser);
$acl->LimitToPrincipal( Id => $self->GroupId );
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 Sun Jan 13 17:52:33 2008
@@ -1498,7 +1498,6 @@
$group->LoadTicketRoleGroup(Type => $args{'Type'}, Ticket => $self->id);
# Find the relevant principal.
- my $principal = RT::Principal->new($self->CurrentUser);
if (!$args{PrincipalId} && $args{Email}) {
# Look up the specified user.
my $user = RT::User->new($self->CurrentUser);
@@ -1511,10 +1510,9 @@
return 0;
}
}
- $principal->Load($args{'PrincipalId'});
# Ask if it has the member in question
- return ($group->HasMember($principal));
+ return $group->HasMember( $args{'PrincipalId'} );
}
# }}}
More information about the Rt-commit
mailing list