[Rt-commit] rt branch, 4.4/better-already-has-right-error, created. rt-4.2.10-227-g3ae3143

Jesse Vincent jesse at bestpractical.com
Tue Mar 31 14:04:43 EDT 2015


The branch, 4.4/better-already-has-right-error has been created
        at  3ae3143e910ca19c7b086c7009200105cb29d0e9 (commit)

- Log -----------------------------------------------------------------
commit 3ae3143e910ca19c7b086c7009200105cb29d0e9
Author: Jesse Vincent <jesse at bestpractical.com>
Date:   Tue Mar 31 11:02:35 2015 -0700

    Add more information to the "user already has right" error.
    
    Add more information to the "user already has right" error.
    This change makes it easier to understand what's going wrong
    if a number of rights are granted at once, as often happens
    in initialdata files.

diff --git a/lib/RT/ACE.pm b/lib/RT/ACE.pm
index c27a82b..b6e9815 100644
--- a/lib/RT/ACE.pm
+++ b/lib/RT/ACE.pm
@@ -268,8 +268,8 @@ sub Create {
                        ObjectId      => $args{'ObjectId'},
                    );
     if ( $self->Id ) {
-        return ( 0, $self->loc('[_1] already has that right',
-                    $princ_obj->Object->Name) );
+        return ( 0, $self->loc('[_1] already has the right [_2] on [_3] [_4]',
+                    $princ_obj->Object->Name, $args{'RightName'}, $args{'ObjectType'},  $args{'ObjectId'}) );
     }
 
     my $id = $self->SUPER::Create( PrincipalId   => $princ_obj->id,

-----------------------------------------------------------------------


More information about the rt-commit mailing list