Examples of supportsPasswordChange()


Examples of com.adito.security.UserDatabase.supportsPasswordChange()

                            .getSession());

            /*
             * Set the super user password
             */
            if (udb.supportsPasswordChange() && !superUserPassword.equals("")) {
                udb.changePassword(superUser, "", superUserPassword, false);
                l.add(new WizardActionStatus(WizardActionStatus.COMPLETED_OK, "installation.install.status.superUserPasswordSet"));
            }
        } catch (PasswordPolicyViolationException e) {
            log.error("Failed to configure super user.", e);
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

        // we need to reset the menu items as they could have changed here.
        LogonControllerFactory.getInstance().applyMenuItemChanges(request);

        // Go to the set password page if this is a new account and set password was selected
        if (udb.supportsPasswordChange() && (account.isSetPassword() || !account.getEditing())) {
            request.getSession().setAttribute("setPassword.user", user);
            ActionMessages msgs = new ActionMessages();
            msgs.add(Globals.MESSAGE_KEY, new ActionMessage("createAccount.message.accountSaved"));
            saveMessages(request, msgs);
            return mapping.findForward("setPassword");
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

    if (user == null) {
      user = (User) this.getSessionInfo(request).getHttpSession().getAttribute("newUser");
    }

    if (!udb.supportsPasswordChange()) {
      throw new Exception("Underlying database does not support changing of passwords.");
    }
    SessionInfo info = this.getSessionInfo(request);

    // Read in all of the confidential user attribute values
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

            saveError(request, "availableAccounts.cannotListAccounts", exceptionMessageChain);
            users = new User[0];
        }
        accountsForm.initialize(users, request.getSession());
        ActionMessages messages = new ActionMessages();
        if (userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noPasswordChange.text"));
        }
        if (!userDatabase.supportsAccountCreation() && userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noAccountCreation.text"));
        } else if (!userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

        accountsForm.initialize(users, request.getSession());
        ActionMessages messages = new ActionMessages();
        if (userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noPasswordChange.text"));
        }
        if (!userDatabase.supportsAccountCreation() && userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noAccountCreation.text"));
        } else if (!userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noAccountCreationAndNoPasswordChange.text"));
        }
        if (messages.size() > 0) {
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

        if (userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noPasswordChange.text"));
        }
        if (!userDatabase.supportsAccountCreation() && userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noAccountCreation.text"));
        } else if (!userDatabase.supportsAccountCreation() && !userDatabase.supportsPasswordChange()) {
            messages.add(Globals.MESSAGE_KEY, new ActionMessage("availableAccounts.noAccountCreationAndNoPasswordChange.text"));
        }
        if (messages.size() > 0) {
            saveMessages(request, messages);
        }
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

    public ActionForward onExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {

        ChangePasswordForm f = (ChangePasswordForm) form;
        UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(getSessionInfo(request).getUser().getRealm());
        if (!udb.supportsPasswordChange()) {
            throw new Exception("Changing of passwords is not supported by the underlying user database.");
        }
        User user = LogonControllerFactory.getInstance().getUser(request);

        SessionInfo info = this.getSessionInfo(request);
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

        Permission[] permissions = getPermissions(resourceType);
        boolean isPermitted = permissions.length == 0 ? true : PolicyDatabaseFactory.getInstance().isPermitted(resourceType, permissions, user, true);
       
        UserDatabase userDatabase = UserDatabaseManager.getInstance().getUserDatabase(user.getRealm().getResourceId());
        if(requiresPasswordSupport) {
            isPermitted = isPermitted && userDatabase.supportsPasswordChange();
        }
        if(requiresAccountCreationSupport) {
            isPermitted = isPermitted && userDatabase.supportsAccountCreation();
        }
        return isPermitted;
View Full Code Here

Examples of com.adito.security.UserDatabase.supportsPasswordChange()

    }

    if(!udb.supportsAccountCreation() && requiresAccountCreation) {
      return SKIP_BODY;
    }
    if(!udb.supportsPasswordChange() && requiresPasswordChange) {
      return SKIP_BODY;
    }

    return EVAL_BODY_INCLUDE;
  }
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.