X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=server%2Fruntime%2Forg.argeo.server.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fjcr%2Fsecurity%2FSecurityJcrUtils.java;fp=server%2Fruntime%2Forg.argeo.server.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fjcr%2Fsecurity%2FSecurityJcrUtils.java;h=90a8d87bdd124d08d2e9fa1e89fd7734dfde07f3;hb=0450e423bd759c9e27b43044670e659271392d71;hp=1ba42197e049ae4ea955f64f2847df913ca74e36;hpb=2134dd19734711b05710c1250b665c32fbe7263c;p=lgpl%2Fargeo-commons.git diff --git a/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/security/SecurityJcrUtils.java b/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/security/SecurityJcrUtils.java index 1ba42197e..90a8d87bd 100644 --- a/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/security/SecurityJcrUtils.java +++ b/server/runtime/org.argeo.server.jcr/src/main/java/org/argeo/jcr/security/SecurityJcrUtils.java @@ -13,12 +13,13 @@ import org.argeo.jcr.JcrUtils; import org.argeo.jcr.UserJcrUtils; /** Utilities related to Argeo security model in JCR */ +@Deprecated public class SecurityJcrUtils implements ArgeoJcrConstants { /** * Creates an Argeo user home, does nothing if it already exists. Session is * NOT saved. */ - public static Node createUserHomeIfNeeded(Session session, String username) { + static Node createUserHomeIfNeeded(Session session, String username) { try { String homePath = generateUserHomePath(username); if (session.itemExists(homePath)) @@ -27,8 +28,9 @@ public class SecurityJcrUtils implements ArgeoJcrConstants { Node userHome = JcrUtils.mkdirs(session, homePath); userHome.addMixin(ArgeoTypes.ARGEO_USER_HOME); userHome.setProperty(ArgeoNames.ARGEO_USER_ID, username); - - //JcrUtils.addPrivilege(session, homePath, username, "jcr:all"); + + // JcrUtils.addPrivilege(session, homePath, username, + // "jcr:all"); return userHome; } } catch (RepositoryException e) { @@ -50,7 +52,7 @@ public class SecurityJcrUtils implements ArgeoJcrConstants { * is not saved and the node is in a checkedOut state (that is, it requires * a subsequent checkin after saving the session). */ - public static Node createUserProfile(Session session, String username) { + static Node createUserProfile(Session session, String username) { try { Node userHome = createUserHomeIfNeeded(session, username); if (userHome.hasNode(ArgeoNames.ARGEO_PROFILE)) @@ -78,7 +80,7 @@ public class SecurityJcrUtils implements ArgeoJcrConstants { * * @return the user profile */ - public static Node createUserProfileIfNeeded(Session securitySession, + static Node createUserProfileIfNeeded(Session securitySession, String username) { try { Node userHome = createUserHomeIfNeeded(securitySession, username); @@ -103,7 +105,7 @@ public class SecurityJcrUtils implements ArgeoJcrConstants { /** * @return null if not found * */ - public static Node getUserProfile(Session session, String username) { + static Node getUserProfile(Session session, String username) { try { Node userHome = UserJcrUtils.getUserHome(session, username); if (userHome == null)