rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ja...@apache.org
Subject svn commit: r1232144 - in /incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web: controller/admin/UserController.java validator/UserProfileValidator.java
Date Mon, 16 Jan 2012 20:21:34 GMT
Author: jasha
Date: Mon Jan 16 20:21:34 2012
New Revision: 1232144

URL: http://svn.apache.org/viewvc?rev=1232144&view=rev
Log:
RAVE-424 patch fixing user role assigning. Patch made by Marijan Milicevic.

Modified:
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/UserController.java
    incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/validator/UserProfileValidator.java

Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/UserController.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/UserController.java?rev=1232144&r1=1232143&r2=1232144&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/UserController.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/controller/admin/UserController.java
Mon Jan 16 20:21:34 2012
@@ -31,6 +31,7 @@ import org.apache.rave.portal.web.util.P
 import org.apache.rave.portal.web.util.ViewNames;
 import org.apache.rave.portal.web.validator.UserProfileValidator;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.core.GrantedAuthority;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.ui.ModelMap;
@@ -75,6 +76,7 @@ public class UserController {
 
     @InitBinder
     public void initBinder(WebDataBinder dataBinder) {
+        dataBinder.registerCustomEditor(GrantedAuthority.class, new AuthorityEditor());
         dataBinder.registerCustomEditor(Authority.class, new AuthorityEditor());
         dataBinder.setDisallowedFields("entityId", "username", "password", "confirmPassword");
     }

Modified: incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/validator/UserProfileValidator.java
URL: http://svn.apache.org/viewvc/incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/validator/UserProfileValidator.java?rev=1232144&r1=1232143&r2=1232144&view=diff
==============================================================================
--- incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/validator/UserProfileValidator.java
(original)
+++ incubator/rave/trunk/rave-components/rave-web/src/main/java/org/apache/rave/portal/web/validator/UserProfileValidator.java
Mon Jan 16 20:21:34 2012
@@ -43,7 +43,7 @@ public class UserProfileValidator implem
         this.userService = userService;
     }
 
-    public boolean supports(Class aClass) {
+    public boolean supports(Class<?> aClass) {
         return User.class.isAssignableFrom(aClass);
     }
 
@@ -109,4 +109,4 @@ public class UserProfileValidator implem
             logger.debug("Validation successful");
         }
     }
-}
\ No newline at end of file
+}



Mime
View raw message