Show
Ignore:
Timestamp:
08/14/08 12:01:54 (4 years ago)
Author:
kohlhaas
Message:

closes #56

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/org/rapla/plugin/abstractcalendar/RaplaBuilder.java

    r1112 r1330  
    4949import org.rapla.entities.domain.Appointment; 
    5050import org.rapla.entities.domain.AppointmentBlockArray; 
    51 import org.rapla.entities.domain.Permission; 
    5251import org.rapla.entities.domain.Reservation; 
    5352import org.rapla.entities.dynamictype.Attribute; 
     
    484483        User user; 
    485484        List blocks; 
    486         Category canReadOthersGroup; 
     485        boolean canReadOthers; 
    487486         
    488487        public BuildContext(RaplaBuilder builder, List blocks) 
     
    499498            this.logger = builder.getLogger(); 
    500499            this.user = builder.editingUser; 
    501             try { 
    502                 this.canReadOthersGroup = builder.getClientFacade().getUserGroupsCategory().getCategory( Permission.GROUP_CAN_READ_EVENTS_FROM_OTHERS); 
    503             } catch (RaplaException ex) 
    504             { 
    505                 // we assume that there is no other group 
    506             } 
     500            this.canReadOthers = builder.getClientFacade().canReadReservationsFromOthers(user); 
    507501        } 
    508502 
     
    643637               return false; 
    644638           } 
    645            if ( buildContext.canReadOthersGroup == null ||  user.belongsTo( buildContext.canReadOthersGroup)) 
     639           if ( buildContext.canReadOthers ) 
    646640           { 
    647641               return false;