[Rt-commit] rt branch, 4.4/custom-role-check-right, repushed

? sunnavy sunnavy at bestpractical.com
Thu Dec 20 10:10:56 EST 2018


The branch 4.4/custom-role-check-right was deleted and repushed:
       was 595288555ead026b740c1d81bed0ccd83f63d887
       now 59b440125640a4bd75f0d05cc00d8909229f3cb8

1: 9a55859e47 = 1: e5d9033c3b Make sure RT::Queue::CustomRoles returns an empty collection if no rights
2: 261c1c3cbb < -:  ------- Hide custom roles from Objects' various Role methods if no rights
-:  ------- > 2: e7c293b65e Filter queue custom roles by checking current user's right
3: 595288555e ! 3: 59b4401256 Test custom roles for user rights
    @@ -1,6 +1,6 @@
     Author: sunnavy <sunnavy at bestpractical.com>
     
    -    Test custom roles with user with/without rights
    +    Test custom roles for user rights
     
     diff --git a/t/customroles/basic.t b/t/customroles/basic.t
     --- a/t/customroles/basic.t
    @@ -22,11 +22,11 @@
     +
     +        is_deeply( [ sort $queue->Roles ], [ 'AdminCc', 'Cc', 'Owner', 'Requestor' ], 'Roles' );
     +        is_deeply( [ sort $queue->ManageableRoleGroupTypes ], [ 'AdminCc', 'Cc' ], 'ManageableRoleTypes' );
    -+        ok( !$queue->HasRole( 'RT::CustomRole-1' ), 'HasRole returns false for users without rights' );
    -+        ok( !$queue->HasRole( 'RT::CustomRole-2' ), 'HasRole returns false for users without rights' );
    ++        ok( !$queue->HasRole( $engineer->GroupType ), 'HasRole returns false for users without rights' );
    ++        ok( !$queue->HasRole( $sales->GroupType ), 'HasRole returns false for users without rights' );
     +    }
     +
    -+    $alice->PrincipalObj->GrantRight( Right => 'SeeQueue' );
    ++    RT::Test->set_rights( { Principal => $alice->PrincipalObj, Right => ['SeeQueue'] } );
     +
     +    my @users = ( RT->SystemUser, $alice );
     +    for my $user ( @users ) {



More information about the rt-commit mailing list