rt 4.2.15
[freeside.git] / rt / share / html / Articles / Article / History.html
index 1c2873f..4768010 100644 (file)
@@ -2,7 +2,7 @@
 %#
 %# COPYRIGHT:
 %#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2018 Best Practical Solutions, LLC
 %#                                          <sales@bestpractical.com>
 %#
 %# (Except where explicitly superseded by other copyright notices)
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-<& /Elements/Header, Title => $title &>
+<& /Elements/Header, Title => loc('History for article #[_1]', $id) &>
 <& /Elements/Tabs &>
-<& Elements/ShowHistory, id => $id &>  
+<& /Elements/ShowHistory,
+    Object => $article,
+    ShowHeaders => 0,
+    ShowDisplayModes => 0,
+    ShowActions => 0,
+    DisplayPath => 'History.html',
+    &>
 <%init>
-my $title =loc('History for article #[_1]',$id);
-</%init>
+my $article = RT::Article->new($session{'CurrentUser'});
+$article->Load($id);
+
+Abort(loc("Article #[_1] not found", $id))
+    unless $article->Id;
 
+Abort(loc("Permission Denied"))
+    unless $article->CurrentUserHasRight('ShowArticle');
+</%init>
 <%args>
 $id => undef
 </%args>