summaryrefslogtreecommitdiff
path: root/rt/lib/RT/Dashboard.pm
diff options
context:
space:
mode:
Diffstat (limited to 'rt/lib/RT/Dashboard.pm')
-rw-r--r--rt/lib/RT/Dashboard.pm43
1 files changed, 14 insertions, 29 deletions
diff --git a/rt/lib/RT/Dashboard.pm b/rt/lib/RT/Dashboard.pm
index d84f56baa..6d9eeb6ba 100644
--- a/rt/lib/RT/Dashboard.pm
+++ b/rt/lib/RT/Dashboard.pm
@@ -67,41 +67,26 @@
package RT::Dashboard;
-use RT::SavedSearch;
-
use strict;
use warnings;
use base qw/RT::SharedSetting/;
+use RT::SavedSearch;
+
use RT::System;
-RT::System::AddRights(
- SubscribeDashboard => 'Subscribe to dashboards', #loc_pair
-
- SeeDashboard => 'View system dashboards', #loc_pair
- CreateDashboard => 'Create system dashboards', #loc_pair
- ModifyDashboard => 'Modify system dashboards', #loc_pair
- DeleteDashboard => 'Delete system dashboards', #loc_pair
-
- SeeOwnDashboard => 'View personal dashboards', #loc_pair
- CreateOwnDashboard => 'Create personal dashboards', #loc_pair
- ModifyOwnDashboard => 'Modify personal dashboards', #loc_pair
- DeleteOwnDashboard => 'Delete personal dashboards', #loc_pair
-);
-
-RT::System::AddRightCategories(
- SubscribeDashboard => 'Staff',
-
- SeeDashboard => 'General',
- CreateDashboard => 'Admin',
- ModifyDashboard => 'Admin',
- DeleteDashboard => 'Admin',
-
- SeeOwnDashboard => 'Staff',
- CreateOwnDashboard => 'Staff',
- ModifyOwnDashboard => 'Staff',
- DeleteOwnDashboard => 'Staff',
-);
+'RT::System'->AddRight( Staff => SubscribeDashboard => 'Subscribe to dashboards'); # loc
+
+'RT::System'->AddRight( General => SeeDashboard => 'View system dashboards'); # loc
+'RT::System'->AddRight( Admin => CreateDashboard => 'Create system dashboards'); # loc
+'RT::System'->AddRight( Admin => ModifyDashboard => 'Modify system dashboards'); # loc
+'RT::System'->AddRight( Admin => DeleteDashboard => 'Delete system dashboards'); # loc
+
+'RT::System'->AddRight( Staff => SeeOwnDashboard => 'View personal dashboards'); # loc
+'RT::System'->AddRight( Staff => CreateOwnDashboard => 'Create personal dashboards'); # loc
+'RT::System'->AddRight( Staff => ModifyOwnDashboard => 'Modify personal dashboards'); # loc
+'RT::System'->AddRight( Staff => DeleteOwnDashboard => 'Delete personal dashboards'); # loc
+
=head2 ObjectName