[Bps-public-commit] rt-extension-inlinehelp branch master updated. 1c3bb00777dff2c42596e57f689fe1b13fa1b75c

BPS Git Server git at git.bestpractical.com
Fri Nov 5 21:05:20 UTC 2021


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-extension-inlinehelp".

The branch, master has been updated
       via  1c3bb00777dff2c42596e57f689fe1b13fa1b75c (commit)
      from  1e1a28f8d7102e26c29b5f3e7bf01ad2b9dd7f20 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1c3bb00777dff2c42596e57f689fe1b13fa1b75c
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Nov 6 04:59:17 2021 +0800

    Make sure there is a user logged in
    
    On /NoAuth/ pages, $session{CurrentUser} can hold an RT::CurrentUser
    object without id bound.
    
    Without this, $articles would be created with an invalid current user
    and error out things like:
    
        Couldn't get principal for an empty user
        Can't call method "HasRight" on an undefined value

diff --git a/html/Callbacks/RT-Extension-InlineHelp/Elements/JavascriptConfig/Data b/html/Callbacks/RT-Extension-InlineHelp/Elements/JavascriptConfig/Data
index ab3f5a0..e9b537c 100644
--- a/html/Callbacks/RT-Extension-InlineHelp/Elements/JavascriptConfig/Data
+++ b/html/Callbacks/RT-Extension-InlineHelp/Elements/JavascriptConfig/Data
@@ -1,5 +1,5 @@
 <%INIT>
-return unless $session{CurrentUser};
+return unless $session{CurrentUser} && $session{CurrentUser}->Id;
 return unless RT->Config->Get('ShowInlineHelp', $session{CurrentUser});
 
 my $lh = $session{CurrentUser}->LanguageHandle;
-----------------------------------------------------------------------

Summary of changes:
 html/Callbacks/RT-Extension-InlineHelp/Elements/JavascriptConfig/Data | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


hooks/post-receive
-- 
rt-extension-inlinehelp


More information about the Bps-public-commit mailing list