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))
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) {
* 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))
*
* @return the user profile
*/
- public static Node createUserProfileIfNeeded(Session securitySession,
+ static Node createUserProfileIfNeeded(Session securitySession,
String username) {
try {
Node userHome = createUserHomeIfNeeded(securitySession, username);
/**
* @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)