From 374cef7c269e0fd501b5bd0748c16be690318672 Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Sun, 26 Jun 2011 22:03:48 +0000 Subject: [PATCH] Improvet doc git-svn-id: https://svn.argeo.org/commons/trunk@4613 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../java/org/argeo/security/jcr/JcrUserDetails.java | 12 ++++++++---- .../org.argeo.server.catalina/META-INF/MANIFEST.MF | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/JcrUserDetails.java b/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/JcrUserDetails.java index f7d016cf4..11e463d34 100644 --- a/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/JcrUserDetails.java +++ b/security/runtime/org.argeo.security.core/src/main/java/org/argeo/security/jcr/JcrUserDetails.java @@ -7,6 +7,7 @@ import org.springframework.security.GrantedAuthority; import org.springframework.security.GrantedAuthorityImpl; import org.springframework.security.userdetails.User; +/** User details wrapping a home node. */ public class JcrUserDetails extends User { private static final long serialVersionUID = -3594542993773402380L; private final String homePath; @@ -20,10 +21,7 @@ public class JcrUserDetails extends User { this.homePath = homePath; } - public String getHomePath() { - return homePath; - } - + /** Clone immutable with new roles */ public JcrUserDetails cloneWithNewRoles(List roles) { List authorities = new ArrayList(); for (String role : roles) { @@ -35,9 +33,15 @@ public class JcrUserDetails extends User { authorities.toArray(new GrantedAuthority[authorities.size()])); } + /** Clone immutable with new password */ public JcrUserDetails cloneWithNewPassword(String password) { return new JcrUserDetails(homePath, getUsername(), password, isEnabled(), isAccountNonExpired(), isAccountNonExpired(), isAccountNonLocked(), getAuthorities()); } + + public String getHomePath() { + return homePath; + } + } diff --git a/server/modules/org.argeo.server.catalina/META-INF/MANIFEST.MF b/server/modules/org.argeo.server.catalina/META-INF/MANIFEST.MF index bd4be302e..4b05e6e7a 100644 --- a/server/modules/org.argeo.server.catalina/META-INF/MANIFEST.MF +++ b/server/modules/org.argeo.server.catalina/META-INF/MANIFEST.MF @@ -5,7 +5,7 @@ Bundle-Version: 0.3.3.SNAPSHOT Bundle-SymbolicName: org.argeo.server.catalina Import-Package: org.apache.commons.logging.impl;resolution:=optional, org.argeo.security.core;resolution:=optional, - org.argeo.security.nature;resolution:=optional, + org.argeo.security.jcr;resolution:=optional, org.springframework.beans.factory.support;resolution:=optional, org.springframework.context.annotation;resolution:=optional, org.springframework.orm.jpa.support;resolution:=optional, -- 2.30.2