[Rt-commit] rt branch, 4.0/approval-permission-error, created. rt-4.0.5-112-g3939e65
? sunnavy
sunnavy at bestpractical.com
Wed Mar 28 03:27:47 EDT 2012
The branch, 4.0/approval-permission-error has been created
at 3939e65080d463cb065295f2c7825a0c1f1fde8e (commit)
- Log -----------------------------------------------------------------
commit 3939e65080d463cb065295f2c7825a0c1f1fde8e
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Mar 28 13:38:31 2012 +0800
show "No permission" so user knows what is going on
see #19614
diff --git a/share/html/Approvals/autohandler b/share/html/Approvals/autohandler
index a057706..3e0f2c6 100644
--- a/share/html/Approvals/autohandler
+++ b/share/html/Approvals/autohandler
@@ -46,8 +46,13 @@
%#
%# END BPS TAGGED BLOCK }}}
<%init>
-$m->call_next(%ARGS) if $session{'CurrentUser'}->UserObj->HasRight(
+if ( $session{'CurrentUser'}->UserObj->HasRight(
Right => 'ShowApprovalsTab',
Object => $RT::System,
-);
+) ) {
+ $m->call_next(%ARGS);
+}
+else {
+ Abort("No permission to view approval");
+}
</%init>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list