[Rt-commit] rt branch, 4.2/showemail-updates, created. rt-4.2.1-27-g444acdb
Jim Brandt
jbrandt at bestpractical.com
Mon Nov 25 16:27:17 EST 2013
The branch, 4.2/showemail-updates has been created
at 444acdb3e85b687db12593e752accefc7999d9bc (commit)
- Log -----------------------------------------------------------------
commit f6485bc2857011b019c6c8ad6280856cea18caa9
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..87c4957 100644
--- a/share/html/Ticket/ShowEmailRecord.html
+++ b/share/html/Ticket/ShowEmailRecord.html
@@ -102,7 +102,10 @@ unless ($AttachmentObj->TransactionId() == $Transaction ) {
}
</%INIT>
-<& /Elements/Header, ShowBar => 0 &>
+<& /Elements/Header, ShowBar => 0,
+ Title => 'Email Source for Ticket '
+ . $AttachmentObj->TransactionObj->ObjectId
+ . ', Attachment ' . $AttachmentObj->Id &>
% $show->( $AttachmentObj );
</body>
</html>
commit 444acdb3e85b687db12593e752accefc7999d9bc
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 87c4957..25c4c76 100644
--- a/share/html/Ticket/ShowEmailRecord.html
+++ b/share/html/Ticket/ShowEmailRecord.html
@@ -101,12 +101,20 @@ 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,
- Title => 'Email Source for Ticket '
- . $AttachmentObj->TransactionObj->ObjectId
- . ', Attachment ' . $AttachmentObj->Id &>
-% $show->( $AttachmentObj );
+<& /Elements/Header, ShowBar => 0, Title => $title &>
+% 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