Esempio n. 1
0
 protected AdministerUserCommand(
     PscUser user,
     ProvisioningSessionFactory provisioningSessionFactory,
     AuthorizationManager authorizationManager,
     AuthenticationSystem authenticationSystem,
     ApplicationSecurityManager applicationSecurityManager,
     CsmUserCache csmUserCache) {
   super(
       user == null ? AuthorizationObjectFactory.createPscUser() : user,
       provisioningSessionFactory,
       applicationSecurityManager);
   this.authorizationManager = authorizationManager;
   this.authenticationSystem = authenticationSystem;
   this.csmUserCache = csmUserCache;
 }
Esempio n. 2
0
 private void saveOrUpdateUser() throws CSTransactionException {
   if (isNewUser() && lookUpBoundUser) {
     User found = authorizationManager.getUser(getUser().getCsmUser().getLoginName());
     if (found != null) {
       copyBoundProperties(this.getUser().getCsmUser(), found);
       setUser(AuthorizationObjectFactory.createPscUser(found));
       modifyCsmUser();
     } else {
       authorizationManager.createUser(getUser().getCsmUser());
     }
   } else if (getUser().getCsmUser().getUserId() == null) {
     authorizationManager.createUser(getUser().getCsmUser());
   } else {
     modifyCsmUser();
   }
 }