[Rt-commit] rt branch, 4.2/showemail-updates, created. rt-4.2.1-26-gd4a9359
Jim Brandt
jbrandt at bestpractical.com
Mon Nov 25 16:43:56 EST 2013
The branch, 4.2/showemail-updates has been created
at d4a9359c692ecf38e763a7df6049e6f112be406e (commit)
- Log -----------------------------------------------------------------
commit 6ac231913e275c381f963492b3dab3b5a861cee1
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Nov 22 14:19:43 2013 -0500
Update title to describe what page is
diff --git a/share/html/Ticket/ShowEmailRecord.html b/share/html/Ticket/ShowEmailRecord.html
index 2d4be7d..47b05cf 100644
--- a/share/html/Ticket/ShowEmailRecord.html
+++ b/share/html/Ticket/ShowEmailRecord.html
@@ -101,8 +101,12 @@ unless ($AttachmentObj->TransactionId() == $Transaction ) {
Abort(loc("Attachment '[_1]' could not be loaded", $Attachment));
}
+my $title = loc("Email Source for Ticket [_1], Attachment [_2]",
+ $AttachmentObj->TransactionObj->ObjectId,
+ $AttachmentObj->Id);
+
</%INIT>
-<& /Elements/Header, ShowBar => 0 &>
+<& /Elements/Header, ShowBar => 0, Title => $title &>
% $show->( $AttachmentObj );
</body>
</html>
commit d4a9359c692ecf38e763a7df6049e6f112be406e
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Fri Nov 22 15:11:53 2013 -0500
Check rights on show email page
Check transaction rights for show email and show an error
message for insufficient rights. Manually create the error
message because the error page displayed by Abort shows the
full header and tabs, which covers the message. Since the show
email page has an uncommon layout, better to display the simple
error in place than heavily modify the Error template to handle
it.
Resolves issues ticket: 27379
diff --git a/share/html/Ticket/ShowEmailRecord.html b/share/html/Ticket/ShowEmailRecord.html
index 47b05cf..25c4c76 100644
--- a/share/html/Ticket/ShowEmailRecord.html
+++ b/share/html/Ticket/ShowEmailRecord.html
@@ -107,7 +107,14 @@ my $title = loc("Email Source for Ticket [_1], Attachment [_2]",
</%INIT>
<& /Elements/Header, ShowBar => 0, Title => $title &>
-% $show->( $AttachmentObj );
+% if ( $AttachmentObj->TransactionObj->CurrentUserCanSee("Transaction")){
+% $show->( $AttachmentObj );
+% }
+% else {
+<div id="body"><div class="error">
+<&|/l&>Permission Denied</&>
+</div></div>
+% }
</body>
</html>
% $m->abort;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list