Changeset 1331

Show
Ignore:
Timestamp:
08/19/08 00:54:00 (3 years ago)
Author:
kohlhaas
Message:

closes #3

Location:
trunk/src/org/rapla
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/org/rapla/server/internal/ServerServiceImpl.java

    r1286 r1331  
    5151import org.rapla.storage.AuthenticationStore; 
    5252import org.rapla.storage.CachableStorageOperator; 
     53import org.rapla.storage.RaplaSecurityException; 
    5354import org.rapla.storage.StorageOperator; 
    5455import org.rapla.storage.StorageUpdateListener; 
     
    481482                user = (User) this.operator.editObject( user, null ); 
    482483            } 
    483             if ( authenticationStore.initUser( user, username, password, 
     484             
     485            boolean initUser ; 
     486            try 
     487            { 
     488                initUser = authenticationStore.initUser( user, username, password, 
    484489                                               this.operator.getSuperCategory() 
    485                                                             .getCategory( Permission.GROUP_CATEGORY_KEY ) ) ) 
     490                                                            .getCategory( Permission.GROUP_CATEGORY_KEY ) ); 
     491            } catch (RaplaSecurityException ex){ 
     492                throw new RaplaSecurityException(i18n.getString("error.login")); 
     493            } 
     494            if ( initUser ) 
    486495            { 
    487496                this.operator.storeAndRemove( new Entity[] 
    488                     { user }, Entity.ENTITY_ARRAY, user ); 
     497                    { user }, Entity.ENTITY_ARRAY, null ); 
    489498            } 
    490499        } 
  • trunk/src/org/rapla/storage/dbsql/DBOperator.java

    r1293 r1331  
    335335                 connection.commit(); 
    336336             } 
    337              UpdateResult result = super.update(evt, true); 
    338              fireStorageUpdated(result); 
    339         } catch (Exception ex) { 
     337         } catch (Exception ex) { 
    340338             try { 
    341339                 if (bSupportsTransactions) { 
     
    358356            close( connection ); 
    359357        } 
     358        UpdateResult result = super.update(evt, true); 
     359        fireStorageUpdated(result); 
    360360         
    361361    }