Package com.adito.security

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


                /*
                 * The super exists so just update it
                 */
                if (isSuperUserCreationSupported(udb)) {
                    // (Probably) Already exists, just update
                    udb.updateAccount(user, email, user.getFullname(), user.getRoles());
                    l.add(new WizardActionStatus(WizardActionStatus.COMPLETED_OK, "installation.install.status.superUserUpdated"));
                }
            } catch (Exception unfe) {
                if (isSuperUserCreationSupported(udb)) {
                    udb.createAccount(superUser, superUserPassword, email, "Super User", new Role[] {});
View Full Code Here


            }

            if (account.getEditing()) {
                user = udb.getAccount(account.getUsername());
                try {
                    udb.updateAccount(user, account.getEmail(), account.getFullname(), roles);
                    CoreEvent coreEvent = new CoreEvent(this, CoreEventConstants.USER_EDITED, user, info)
                        .addAttribute(CoreAttributeConstants.EVENT_ATTR_PRINCIPAL_ID, user.getPrincipalName())
                        .addAttribute(CoreAttributeConstants.EVENT_ATTR_FULL_NAME, user.getFullname())
                      .addAttribute(CoreAttributeConstants.EVENT_ATTR_ACCOUNT_EMAIL, user.getEmail());
View Full Code Here

                // role is already assigned so make sure this don't happen again
                selectedUsers.remove(principalName);
            } else {
                Role[] updatedRoles = removeRole(role, user.getRoles());
                try {
                    userDatabase.updateAccount(user, user.getEmail(), user.getFullname(), updatedRoles);
                } catch (GroupsRequiredForUserException e) {
                    usersNotRemoved.add(principalName);
                }
            }
        }
View Full Code Here

        }
       
        for (String principalName : selectedUsers) {
            User user = userDatabase.getAccount(principalName);
            Role[] updatedRoles = addRole(role, user.getRoles());
            userDatabase.updateAccount(user, user.getEmail(), user.getFullname(), updatedRoles);
        }
        return usersNotRemoved.toArray(new String[usersNotRemoved.size()]);
    }
   
    private Role[] addRole(Role role, Role[] userRoles) {
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.