You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2008/09/09 19:56:09 UTC
svn commit: r693528 - in /cocoon/branches/BRANCH_2_1_X:
src/blocks/auth/java/org/apache/cocoon/auth/ApplicationUtil.java status.xml
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 & Rafael Márquez" due-to-email="ktorres@agssa.net & rmarquez@agssa.net">
Forms: MultiValueField list-type="double-listbox" does not work correctly in ajax enabled forms.
</action>