[Rt-commit] r18950 - rt/3.999/trunk/lib/RT/Model
ruz at bestpractical.com
ruz at bestpractical.com
Fri Mar 27 10:13:38 EDT 2009
Author: ruz
Date: Fri Mar 27 10:13:38 2009
New Revision: 18950
Modified:
rt/3.999/trunk/lib/RT/Model/CachedGroupMember.pm
Log:
* drop *_obj methods in CGM class
Modified: rt/3.999/trunk/lib/RT/Model/CachedGroupMember.pm
==============================================================================
--- rt/3.999/trunk/lib/RT/Model/CachedGroupMember.pm (original)
+++ rt/3.999/trunk/lib/RT/Model/CachedGroupMember.pm Fri Mar 27 10:13:38 2009
@@ -221,7 +221,7 @@
return (undef);
}
- unless ( $self->group_obj->object ) {
+ unless ( $self->group->object ) {
warn "HEY! NO group object object!!!" . $self->__value('group_id');
warn YAML::Dump($self);
@@ -229,9 +229,9 @@
return undef;
}
- # Unless $self->group_obj still has the member recursively $self->member_obj
+ # Unless $self->group still has the member recursively $self->member
# (Since we deleted the database row above, $self no longer counts)
- unless ( $self->group_obj->object->has_member( $self->member_id, recursively => 1 ) ) {
+ unless ( $self->group->object->has_member( principal => $self->member_id, recursively => 1 ) ) {
# Find all ACEs granted to $self->group_id
my $acl = RT::Model::ACECollection->new( current_user => RT->system_user );
@@ -284,9 +284,9 @@
}
}
- # Unless $self->group_obj still has the member recursively $self->member_obj
+ # Unless $self->group still has the member recursively $self->member
# (Since we Setdisabledd the database row above, $self no longer counts)
- unless ( $self->group_obj->object->has_member( $self->member_id, recursively => 1 ) ) {
+ unless ( $self->group->object->has_member( principal => $self->member_id, recursively => 1 ) ) {
# Find all ACEs granted to $self->group_id
my $acl = RT::Model::ACECollection->new( current_user => RT->system_user );
@@ -296,49 +296,4 @@
return ($err);
}
-
-
-=head2 group_obj
-
-Returns the RT::Model::Principal object for this group Group
-
-=cut
-
-sub group_obj {
- my $self = shift;
- my $principal = RT::Model::Principal->new( current_user => $self->current_user );
- $principal->load( $self->group_id );
- return ($principal);
-}
-
-
-
-=head2 immediate_parent_obj
-
-Returns the RT::Model::Principal object for this group immediate_parent
-
-=cut
-
-sub immediate_parent_obj {
- my $self = shift;
- my $principal = RT::Model::Principal->new( current_user => $self->current_user );
- $principal->load( $self->immediate_parent );
- return ($principal);
-}
-
-
-
-=head2 member_obj
-
-Returns the RT::Model::Principal object for this group member
-
-=cut
-
-sub member_obj {
- my $self = shift;
- my $principal = RT::Model::Principal->new( current_user => $self->current_user );
- $principal->load( $self->member_id );
- return ($principal);
-}
-
1;
More information about the Rt-commit
mailing list