[Rt-commit] rt branch, 4.2/current-user-in-format, created. rt-4.0.6-332-g11b459f

Thomas Sibley trs at bestpractical.com
Fri Jun 1 16:00:14 EDT 2012


The branch, 4.2/current-user-in-format has been created
        at  11b459fd1724ad8b556629d0a1ce6855efa5c612 (commit)

- Log -----------------------------------------------------------------
commit 11b459fd1724ad8b556629d0a1ce6855efa5c612
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