Example #1
0
  @Override
  public void onRequestEntity(GwtConversation conversation, String entityId) {
    assertProjectSelected(conversation);

    try {
      AEntity entity = getDaoService().getById(entityId);
      if (!Auth.isVisible(entity, conversation.getSession().getUser()))
        throw new PermissionDeniedException();
      // TODO check if entity is from project
      conversation.sendToClient(entity);
      conversation.sendToClient(getAssociatedEntities(entity));
    } catch (EntityDoesNotExistException ex) {
      log.info("Requested entity not found:", entityId);
      // nop
    }
  }
Example #2
0
 @Override
 public boolean isVisibleFor(User user) {
   return Auth.isVisible(getParent(), user);
 }