[Rt-commit] rt branch, 4.0/current-user-in-format, created. rt-4.0.6-126-gb214017

Thomas Sibley trs at bestpractical.com
Fri Jun 1 13:52:07 EDT 2012


The branch, 4.0/current-user-in-format has been created
        at  b214017d99bcccce62f51a8436cc2115f541c0fd (commit)

- Log -----------------------------------------------------------------
commit b214017d99bcccce62f51a8436cc2115f541c0fd
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Jun 1 13:50:24 2012 -0400

    Provide __CurrentUser__ and __CurrentUserName__ for search result formats
    
    Now it's possible to construct links based on the current user, for
    example.

diff --git a/share/html/Elements/ColumnMap b/share/html/Elements/ColumnMap
index 87fd61b..4fa8214 100644
--- a/share/html/Elements/ColumnMap
+++ b/share/html/Elements/ColumnMap
@@ -160,6 +160,8 @@ my $COLUMN_MAP = {
     } qw(WebPath WebBaseURL WebURL)),
     WebRequestPath    => { value => sub { substr( $m->request_path, 1 ) } },
     WebRequestPathDir => { value => sub { substr( $m->request_comp->dir_path, 1 ) } },
+    CurrentUser       => { value => sub { $session{CurrentUser}->id } },
+    CurrentUserName   => { value => sub { $session{CurrentUser}->Name } },
 };
 
 $COLUMN_MAP->{'CF'} = $COLUMN_MAP->{'CustomField'};

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


More information about the Rt-commit mailing list