Examples of supportsAccountCreation()


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

        UserAccountForm account = (UserAccountForm) form;
        PolicyUtil.checkPermission(PolicyConstants.ACCOUNTS_AND_GROUPS_RESOURCE_TYPE, PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN, request);
        SessionInfo info = this.getSessionInfo(request);
        UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(getSessionInfo(request).getUser().getRealm());
        User user = null;
        if(udb.supportsAccountCreation()) {
            PropertyList roleList = account.getRolesList();
            int idx = 0;
            Role[] roles = new Role[roleList.size()];
            for(Iterator i = roleList.iterator(); i.hasNext(); ) {
                roles[idx++] = udb.getRole((String)i.next());
View Full Code Here

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

        }
        if (!found) {
            UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(currentUser.getRealm());
            for (int i = 0; accounts != null && i < accounts.length; i++) {
                User user = udb.getAccount(accounts[i]);
                if(udb.supportsAccountCreation()) {
                  try {
                        udb.deleteAccount(user);
                        CoreServlet.getServlet().fireCoreEvent(new CoreEvent(this, CoreEventConstants.USER_REMOVED, null, null, CoreEvent.STATE_SUCCESSFUL)
                            .addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_ID, user.getPrincipalName())
                            .addAttribute(CoreAttributeConstants.EVENT_ATTR_FULL_NAME, user.getFullname()));
View Full Code Here

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

            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.supportsAccountCreation()

        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.supportsAccountCreation()

        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.supportsAccountCreation()

        }
        if (!found) {
            UserDatabase udb = UserDatabaseManager.getInstance().getUserDatabase(getSessionInfo(request).getUser().getRealm());
            for (int i = 0; accounts != null && i < accounts.length; i++) {
                User user = udb.getAccount(accounts[i]);
                if (udb.supportsAccountCreation()) {
                    try {
                        // check to see if the user has a session, if so then logoff.
                        Iterator loggedOnUserSessions = LogonControllerFactory.getInstance().getActiveSessions().values()
                                        .iterator();
                        while (loggedOnUserSessions.hasNext()) {
View Full Code Here

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

                saveErrors(request, errs);
                roles = new Role[0];
            }
            showAvailableRolesForm.initialize(roles, request.getSession());
            ActionMessages msgs = new ActionMessages();
            if (!userDatabase.supportsAccountCreation()) {
                msgs.add(Globals.MESSAGE_KEY, new ActionMessage("availableRoles.noRoleCreation.text"));
            }
            if (msgs.size() > 0) {
                saveMessages(request, msgs);
            }
View Full Code Here

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

     */
    public ActionForward create(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response)
                    throws Exception {
        SessionInfo sessionInfo = getSessionInfo(request);
        UserDatabase userDatabase = UserDatabaseManager.getInstance().getUserDatabase(sessionInfo.getUser().getRealm());
        if (!userDatabase.supportsAccountCreation()) {
            throw new Exception("The underlying user database does not support role creation.");
        }
        PolicyUtil.checkPermission(PolicyConstants.ACCOUNTS_AND_GROUPS_RESOURCE_TYPE,
            PolicyConstants.PERM_CREATE_EDIT_AND_ASSIGN, request);
        RoleForm roleForm = (RoleForm) form;
View Full Code Here

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

        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.supportsAccountCreation()

            udb = UserDatabaseManager.getInstance().getUserDatabase(user.getRealm().getResourceId());
        } catch (Exception e1) {
            return SKIP_BODY;
        }

      if(!udb.supportsAccountCreation()) {
        return databaseWriteEnabled ? SKIP_BODY : EVAL_BODY_INCLUDE;
      }
     
    return databaseWriteEnabled ? EVAL_BODY_INCLUDE : SKIP_BODY;
  }
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.