[Rt-commit] r13633 - in rt/3.8/trunk: .

sartak at bestpractical.com sartak at bestpractical.com
Thu Jun 26 20:07:35 EDT 2008


Author: sartak
Date: Thu Jun 26 20:07:32 2008
New Revision: 13633

Modified:
   rt/3.8/trunk/   (props changed)
   rt/3.8/trunk/lib/RT/Dashboard.pm
   rt/3.8/trunk/lib/RT/SharedSetting.pm

Log:
 r63278 at onn:  sartak | 2008-06-26 17:30:56 -0400
 Remove the Delete right checks


Modified: rt/3.8/trunk/lib/RT/Dashboard.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/Dashboard.pm	(original)
+++ rt/3.8/trunk/lib/RT/Dashboard.pm	Thu Jun 26 20:07:32 2008
@@ -93,14 +93,6 @@
 
 sub ObjectName { "dashboard" }
 
-=head2 DeleteRightName
-
-Objects of this class check the "DeleteDashboard" right
-
-=cut
-
-sub DeleteRightName { "DeleteDashboard" }
-
 sub SaveAttribute {
     my $self   = shift;
     my $object = shift;
@@ -228,7 +220,7 @@
 
     my ($local_right, $system_right) = $args{Modify}
                                      ? ('ModifyDashboard', 'SuperUser')
-                                     : ('SeeDashboard', undef);
+                                     : ('SeeDashboard', 'SeeDashboard');
 
     my $CurrentUser = $self->CurrentUser;
     my @objects;
@@ -252,9 +244,9 @@
     } @{ $groups->ItemsArrayRef };
 
     push @objects, RT::System->new($CurrentUser)
-        unless $system_right && !$CurrentUser->HasRight(
-            Object => $RT::System,
+        if $CurrentUser->HasRight(
             Right  => $system_right,
+            Object => $RT::System,
         );
 
     return @objects;

Modified: rt/3.8/trunk/lib/RT/SharedSetting.pm
==============================================================================
--- rt/3.8/trunk/lib/RT/SharedSetting.pm	(original)
+++ rt/3.8/trunk/lib/RT/SharedSetting.pm	Thu Jun 26 20:07:32 2008
@@ -242,24 +242,11 @@
 Deletes the existing shared setting. Returns a tuple of status and message,
 where status is true upon success.
 
-Uses the C<DeleteRightName> method for discovering which right to check.
-
 =cut
 
-sub DeleteRightName { undef }
-
 sub Delete {
     my $self = shift;
 
-    my $right_name = $self->DeleteRightName;
-    if ($right_name) {
-        return (0, $self->loc("Permission denied"))
-            unless $self->CurrentUser->HasRight(
-                Object => $RT::System,
-                Right  => $right_name,
-            );
-    }
-
     my ($status, $msg) = $self->{'Attribute'}->Delete;
     if ($status) {
         return (1, $self->loc("Deleted [_1]", $self->ObjectName));


More information about the Rt-commit mailing list