[Rt-commit] r19957 - rt/branches/3.6-RELEASE/html/Admin/Global
sartak at bestpractical.com
sartak at bestpractical.com
Mon Jun 8 18:41:35 EDT 2009
Author: sartak
Date: Mon Jun 8 18:41:35 2009
New Revision: 19957
Modified:
rt/branches/3.6-RELEASE/html/Admin/Global/MyRT.html
Log:
Allow only SuperUser to edit RT at a Glance
Modified: rt/branches/3.6-RELEASE/html/Admin/Global/MyRT.html
==============================================================================
--- rt/branches/3.6-RELEASE/html/Admin/Global/MyRT.html (original)
+++ rt/branches/3.6-RELEASE/html/Admin/Global/MyRT.html Mon Jun 8 18:41:35 2009
@@ -83,6 +83,8 @@
my ($default_portlets) = $sys->Attributes->Named('HomepageSettings');
+my $has_right = $session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser');
+
my @panes = $m->comp(
'/Admin/Elements/ConfigureMyRT',
panes => ['body', 'summary'],
@@ -91,8 +93,13 @@
current_portlets => $default_portlets->Content,
OnSave => sub {
my ( $conf, $pane ) = @_;
- $default_portlets->SetContent( $conf );
- push @actions, loc( 'Global portlet [_1] saved.', $pane );
+ if (!$has_right) {
+ push @actions, loc( 'Permission denied' );
+ }
+ else {
+ $default_portlets->SetContent( $conf );
+ push @actions, loc( 'Global portlet [_1] saved.', $pane );
+ }
}
);
More information about the Rt-commit
mailing list