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

Jesse Vincent jesse at bestpractical.com
Tue Mar 31 16:46:51 EDT 2015


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

- Log -----------------------------------------------------------------
commit e02ad240e81688821c2778aef63807677629882c
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