[Rt-commit] [svn] r1449 - in rt/branches/3.3-TESTING: . lib/RT

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Wed Sep 8 12:48:49 EDT 2004


Author: jesse
Date: Wed Sep  8 12:48:48 2004
New Revision: 1449

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/lib/RT/Group_Overlay.pm
   rt/branches/3.3-TESTING/lib/RT/Groups_Overlay.pm
   rt/branches/3.3-TESTING/lib/RT/System.pm
Log:
 r10198 at tinbook:  jesse | 2004-09-08T16:40:40.817855Z
 Added new rights: ShowConfigTab, LoadSavedSearch, CreateSavedSearch


Modified: rt/branches/3.3-TESTING/lib/RT/Group_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Group_Overlay.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Group_Overlay.pm	Wed Sep  8 12:48:48 2004
@@ -171,6 +171,7 @@
     ModifyOwnMembership => 'Join or leave this group',                 # loc_pair
     EditSavedSearches => 'Edit saved searches for this group',        # loc_pair
     ShowSavedSearches => 'Display saved searches for this group',        # loc_pair
+    SeeGroup => 'Make this group visible to user',                    # loc_pair
 };
 
 # Tell RT::ACE that this sort of object can get acls granted

Modified: rt/branches/3.3-TESTING/lib/RT/Groups_Overlay.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/Groups_Overlay.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/Groups_Overlay.pm	Wed Sep  8 12:48:48 2004
@@ -415,6 +415,28 @@
 }
 # }}}
 
+# {{{ sub Next
+
+sub Next {
+    my $self = shift;
+
+    # Don't show groups which the user isn't allowed to see.
+
+    my $Group = $self->SUPER::Next();
+    if ((defined($Group)) and (ref($Group))) {
+	unless ($Group->CurrentUserHasRight('SeeGroup')) {
+	    return $self->Next();
+	}
+	
+	return $Group;
+    }
+    else {
+	return undef;
+    }
+}
+
+
+
 sub _DoSearch {
     my $self = shift;
     

Modified: rt/branches/3.3-TESTING/lib/RT/System.pm
==============================================================================
--- rt/branches/3.3-TESTING/lib/RT/System.pm	(original)
+++ rt/branches/3.3-TESTING/lib/RT/System.pm	Wed Sep  8 12:48:48 2004
@@ -81,7 +81,10 @@
     AdminUsers     => 'Create, delete and modify users',              # loc_pair
     ModifySelf     => "Modify one's own RT account",                  # loc_pair
     DelegateRights =>
-      "Delegate specific rights which have been granted to you."      # loc_pair
+      "Delegate specific rights which have been granted to you.",     # loc_pair
+    ShowConfigTab => "show Configuration tab",     # loc_pair
+    LoadSavedSearch => "allow loading of saved searches",     # loc_pair
+    CreateSavedSearch => "allow creation of saved searches",      # loc_pair
 };
 
 # Tell RT::ACE that this sort of object can get acls granted


More information about the Rt-commit mailing list