cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r693528 - in /cocoon/branches/BRANCH_2_1_X: src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java status.xml
Date Tue, 09 Sep 2008 17:56:09 GMT
Author: joerg
Date: Tue Sep  9 10:56:09 2008
New Revision: 693528

URL: http://svn.apache.org/viewvc?rev=693528&view=rev
Log:
COCOON-2243: Handle case in ApplicationUtil.isUserInRole(..) when User is null.

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java
    cocoon/branches/BRANCH_2_1_X/status.xml

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java?rev=693528&r1=693527&r2=693528&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java
Tue Sep  9 10:56:09 2008
@@ -88,7 +88,10 @@
      * @return This returns true, if the user has the role; otherwise false is returned.
      */
     public static boolean isUserInRole(final User user, final String role, final Map objectModel)
{
-        boolean result = user.isUserInRole(role);
+        boolean result = false;
+        if (user != null) {
+            result = user.isUserInRole(role);
+        }
         if ( !result ) {
             final Request req = ObjectModelHelper.getRequest(objectModel);
             result = req.isUserInRole(role);

Modified: cocoon/branches/BRANCH_2_1_X/status.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/status.xml?rev=693528&r1=693527&r2=693528&view=diff
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/status.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/status.xml Tue Sep  9 10:56:09 2008
@@ -186,6 +186,9 @@
     <action dev="all" type="update">
       Starting with 2.1.12 the minimum required Java version will be 1.4.2.
     </action>
+    <action dev="joerg" type="add" fixes-bug="COCOON-2243" due-to="Benjamin Boksa" due-to-email="benjamin@boksa.de">
+      Handle case in ApplicationUtil.isUserInRole(..) when User is null.
+    </action>
     <action dev="AG" type="fix" fixes-bug="COCOON-1822" due-to="Karen Torres &amp;
Rafael Márquez" due-to-email="ktorres@agssa.net &amp; rmarquez@agssa.net">
       Forms: MultiValueField list-type="double-listbox" does not work correctly in ajax enabled
forms.
     </action>



Mime
View raw message