rt 4.0.23
[freeside.git] / rt / lib / RT / Dashboard.pm
index 6d4c515..d84f56b 100644 (file)
@@ -2,7 +2,7 @@
 #
 # COPYRIGHT:
 #
-# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC
+# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
 #                                          <sales@bestpractical.com>
 #
 # (Except where explicitly superseded by other copyright notices)
@@ -270,8 +270,7 @@ sub _PrivacyObjects {
 
     my $groups = RT::Groups->new($CurrentUser);
     $groups->LimitToUserDefinedGroups;
-    $groups->WithMember( PrincipalId => $CurrentUser->Id,
-                         Recursively => 1 );
+    $groups->WithCurrentUser;
     push @objects, @{ $groups->ItemsArrayRef };
 
     push @objects, RT::System->new($CurrentUser);
@@ -401,10 +400,7 @@ sub ObjectsForLoading {
         Right             => 'SeeGroupDashboard',
         IncludeSuperusers => $args{IncludeSuperuserGroups},
     );
-    $groups->WithMember(
-        Recursively => 1,
-        PrincipalId => $CurrentUser->UserObj->PrincipalId
-    );
+    $groups->WithCurrentUser;
     my $attrs = $groups->Join(
         ALIAS1 => 'main',
         FIELD1 => 'id',