Examples of enforcePolicyOnUserCreate()


Examples of org.jahia.services.pwdpolicy.JahiaPasswordPolicyService.enforcePolicyOnUserCreate()

            if (!passwdConfirm.equals(passwd)) {
                userMessage = getMessage(
                        "org.jahia.admin.userMessage.passwdNotMatch.label");
                return false;
            }
            PolicyEnforcementResult evalResult = pwdPolicyService.enforcePolicyOnUserCreate(username, passwd);
            if (!evalResult.isSuccess()) {
                EngineMessages policyMsgs = evalResult.getEngineMessages();
                policyMsgs.saveMessages(((ParamBean) jParams).getRequest());
                return false;
            }
View Full Code Here

Examples of org.jahia.services.pwdpolicy.JahiaPasswordPolicyService.enforcePolicyOnUserCreate()

                List<String> lineElementList = Arrays.asList(lineElements);
                Properties properties = buildProperties(headerElementList, lineElementList);
                String userName = lineElementList.get(userNamePos);
                String password = lineElementList.get(passwordPos);
                if (userService.isUsernameSyntaxCorrect(userName)) {
                    PolicyEnforcementResult evalResult = pwdPolicyService.enforcePolicyOnUserCreate(userName, password);
                    if (evalResult.isSuccess()) {
                      JahiaUser jahiaUser = userManager.createUser(userName, password, properties);
                      if (jahiaUser != null) {
                            usersCreatedSuccessfully++;
                            logger.info("Successfully created user {}", userName);
View Full Code Here

Examples of org.jahia.services.pwdpolicy.JahiaPasswordPolicyService.enforcePolicyOnUserCreate()

        } else {
            JahiaPasswordPolicyService pwdPolicyService =
                    ServicesRegistry.getInstance().getJahiaPasswordPolicyService();
            JahiaSite newSite = (JahiaSite) session.getAttribute(CLASS_NAME + "newJahiaSite");
            if (newSite != null) {
                PolicyEnforcementResult evalResult = pwdPolicyService.enforcePolicyOnUserCreate(adminUsername, adminPassword);
                if (!evalResult.isSuccess()) {
                    EngineMessages policyMsgs = evalResult.getEngineMessages();
                    policyMsgs.saveMessages(((ParamBean) jParams).getRequest());
                } else {
                    processError = false;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.