[Rt-commit] [svn] r1450 - in rt/branches/3.3-TESTING: . html/Search/Elements

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


Author: jesse
Date: Wed Sep  8 12:49:07 2004
New Revision: 1450

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/html/Search/Elements/EditSearches
Log:
 r10199 at tinbook:  jesse | 2004-09-08T16:42:14.323284Z
 Edited the Saved Search UI to not display things the user can not do


Modified: rt/branches/3.3-TESTING/html/Search/Elements/EditSearches
==============================================================================
--- rt/branches/3.3-TESTING/html/Search/Elements/EditSearches	(original)
+++ rt/branches/3.3-TESTING/html/Search/Elements/EditSearches	Wed Sep  8 12:49:07 2004
@@ -44,6 +44,9 @@
 %# 
 %# }}} END BPS TAGGED BLOCK
 <& /Elements/TitleBoxStart, title => loc('Saved searches') &>
+%# Hide all the save functionality if the user shouldn't see it.
+% if ($session{'CurrentUser'}->HasRight( Right => 'CreateSavedSearch',
+%                                       Object=> $RT::System )) {
 <&|/l&>Privacy:</&>
 % if ($CurrentSearch->{'Object'} && $CurrentSearch->{'Object'}->id) {
 <& SearchPrivacy, Object => $CurrentSearch->{'Object'}->Object &><br>
@@ -66,12 +69,18 @@
 <input type="submit" name="Save" value="<%loc('Save')%>">
 % }
 <hr>
+% }
 <&|/l&>Load saved search:</&><br>
 <& SelectSearchesForObjects, Name => 'LoadSavedSearch', Objects => \@Objects&>
 <input value="<%loc('Load')%>" type="submit">
 <& /Elements/TitleBoxEnd &>
 
 <%init>
+
+unless ($session{'CurrentUser'}->HasRight( Right => 'LoadSavedSearch',
+                                          Object=> $RT::System )) {
+    return;
+}
 my @Objects;
 
 push @Objects,  $session{CurrentUser}->UserObj;


More information about the Rt-commit mailing list