Attempted fixes
authorAndy Bavier <acb@cs.princeton.edu>
Thu, 29 Oct 2009 15:29:17 +0000 (15:29 +0000)
committerAndy Bavier <acb@cs.princeton.edu>
Thu, 29 Oct 2009 15:29:17 +0000 (15:29 +0000)
sfatables/matches/slice-whitelist.xml
sfatables/processors/slice-whitelist.xsl

index 2489c1c..ad3c840 100644 (file)
@@ -1,4 +1,7 @@
 <match name="slice-whitelist">
-    <context select="//request-context/slice@hrn"/>
-    <processor filename="slice-whitelist.xsl"/>
+    <!-- Empty context. We _always_ get the hrn of the current user -->
+    <rule element='*'>
+      <context select="//sfa/current/slice@hrn"/>
+      <processor filename="slice-whitelist.xsl"/>
+    </rule>
 </match>
index afe77f2..8ca8deb 100644 (file)
@@ -20,7 +20,7 @@
     <xsl:variable name="whitelist" select="exsl:node-set($whitelist_data)/hrn"/>
 
     <!-- Read the value of the current slice's hrn -->
-    <xsl:variable name="current_slice_hrn" select="//request-context/slice/hrn"/>
+    <xsl:variable name="current_slice_hrn" select="//request-context/sfa/slice/hrn"/>
 
     <!-- Define a function that checks if one of a list of prefixes (lst) matches $current_slice_hrn". It's a stupid idea to call a function a 'template' but whatever...  -->
     <xsl:template name="recurse_list">