[Rt-commit] rt branch 4.4/pass-user-object-to-show-user created. rt-4.4.5-40-gd4271148f4

BPS Git Server git at git.bestpractical.com
Wed Apr 6 21:41:42 UTC 2022


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".

The branch, 4.4/pass-user-object-to-show-user has been created
        at  d4271148f422ac932a8303011bf57098a68771c7 (commit)

- Log -----------------------------------------------------------------
commit d4271148f422ac932a8303011bf57098a68771c7
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Thu Apr 7 05:26:03 2022 +0800

    Pass user object to ShowUser* elements
    
    RT::CurrentUser inherits from RT::User, but it lacks a few dynamic field
    methods like NickName, Organization, etc. If customized user formats use
    these fields, dashboard subscription page would error out:
    
        RT::CurrentUser::Organization Unimplemented in RT::User

diff --git a/share/html/Dashboards/Elements/SubscriptionRecipients b/share/html/Dashboards/Elements/SubscriptionRecipients
index 4a4f56827b..9b7c6bba68 100644
--- a/share/html/Dashboards/Elements/SubscriptionRecipients
+++ b/share/html/Dashboards/Elements/SubscriptionRecipients
@@ -172,11 +172,11 @@ if ($GroupString) {
 % if ( $session{CurrentUser}->HasRight( Right => 'AdminUsers', Object => $RT::System ) &&
 %      $session{CurrentUser}->HasRight( Right => 'ShowConfigTab', Object =>$RT::System ) ) {
 <a href="<% RT->Config->Get('WebPath') %>/Admin/Users/Modify.html?id=<% $current_user_id %>">
-<& /Elements/ShowUser, User => $session{CurrentUser} &></a>
+<& /Elements/ShowUser, User => $session{CurrentUser}->UserObj &></a>
 % } else {
-<& /Elements/ShowUser, User => $session{CurrentUser} &>
+<& /Elements/ShowUser, User => $session{CurrentUser}->UserObj &>
 % }
-<& /Elements/ShowUserEmailFrequency, User => $session{CurrentUser} &>
+<& /Elements/ShowUserEmailFrequency, User => $session{CurrentUser}->UserObj &>
 </li>
 
 % for my $user_id (@{ $recipients_users || [] }) {

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


hooks/post-receive
-- 
rt


More information about the rt-commit mailing list