From df0a434d42e18e7cef08c9fa804bb0927a3b6a79 Mon Sep 17 00:00:00 2001
From: dugan <dugan@localhost>
Date: Mon, 21 May 2007 22:47:07 +0000
Subject: [PATCH] Correct problem QA found with fix for issue 1606, where the attribute(s) still were not being returned when they should be. Also, corrected problem where userattr bind rule was using filtered resource entry for userattr bind rule evaluation, causing the bind rule to sometimes not be evaluated correctly if the attribute isn't present during a userattr attribute value expression.

---
 opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/UserAttr.java |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/UserAttr.java b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/UserAttr.java
index c3295fc..2e910a1 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/UserAttr.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/UserAttr.java
@@ -175,7 +175,11 @@
      */
     public EnumEvalResult evaluate(AciEvalContext evalCtx) {
         EnumEvalResult matched;
-
+       //The working resource entry might be filtered and not have an
+       //attribute type that is needed to perform these evaluations. The
+       //evalCtx has a copy of the non-filtered entry, switch to it for these
+       //evaluations.
+       evalCtx.useFullResourceEntry(true);
         switch(userAttrType) {
         case ROLEDN:
         case GROUPDN:
@@ -190,6 +194,8 @@
         default:
             matched=evalVAL(evalCtx);
         }
+        //Switch back to the working resource entry.
+        evalCtx.useFullResourceEntry(false);
         return matched;
     }
 

--
Gitblit v1.10.0