[Building Sakai] Full JSP CRUD tool

menjuanpablo menjuanpablo at gmail.com
Mon May 11 09:23:18 PDT 2009


hi,
the line 98 is in the fuction getallvisibleitems, 
public List<OtrotodoItem> getAllVisibleItems(String locationId, String
userId) {
     log.debug("Fetching visible items for " + userId + " in site: " +
locationId);
      List<OtrotodoItem> l = null;
      if (locationId == null) {
         // get all items
         l = dao.findAll(OtrotodoItem.class);
      } else {
         l = dao.findBySearch(OtrotodoItem.class,
               new Search("locationId", locationId) );
      }
      // check if the current user can see all items (or is super user)
      if ( externalLogic.isUserAdmin(userId) ||
            externalLogic.isUserAllowedInLocation(userId,
ExternalLogic.ITEM_READ_HIDDEN, locationId) ) {
         log.debug("Security override: " + userId + " able to view all
items");
      } else {
         // go backwards through the loop to avoid hitting the "end" early
LINE 98        for (int i=l.size()-1; i >= 0; i--) { :working:
            OtrotodoItem item = (OtrotodoItem) l.get(i);
            if ( item.getHidden().booleanValue() &&
                  !item.getOwnerId().equals(userId) ) {
               l.remove(item);
            }
         }
      }
      return l;
   }


-- 
View this message in context: http://www.nabble.com/Full-JSP-CRUD-tool-tp23437843p23486638.html
Sent from the Sakai - Development mailing list archive at Nabble.com.



More information about the sakai-dev mailing list