[Rt-commit] rt branch 5.0/add-article-portlet2 updated. rt-5.0.3-300-g1979a306ed
BPS Git Server
git at git.bestpractical.com
Fri Mar 31 15:13:42 UTC 2023
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, 5.0/add-article-portlet2 has been updated
via 1979a306edb700ea63861f3d6755d7c9fc10d62b (commit)
from 35cff41eb3bd93d0bfd9a15d34851fb29a4880cc (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 1979a306edb700ea63861f3d6755d7c9fc10d62b
Author: sunnavy <sunnavy at bestpractical.com>
Date: Fri Mar 31 22:56:08 2023 +0800
Hide article portlet if current user does not right to see the article
diff --git a/share/html/Elements/ShowArticle b/share/html/Elements/ShowArticle
index bd2e8e578c..fe4912e536 100644
--- a/share/html/Elements/ShowArticle
+++ b/share/html/Elements/ShowArticle
@@ -122,6 +122,14 @@ $m->callback(
ArticleCFs => $custom_fields,
);
+if ( !$article->CurrentUserCanSee ) {
+ RT->Logger->info(
+ sprintf "User %s doesn't have right to see article #%d",
+ $session{CurrentUser}->Name,
+ $article->Id
+ );
+ return;
+}
</%init>
<%args>
$Ticket
-----------------------------------------------------------------------
Summary of changes:
share/html/Elements/ShowArticle | 8 ++++++++
1 file changed, 8 insertions(+)
hooks/post-receive
--
rt
More information about the rt-commit
mailing list