[Building Sakai] Full JSP CRUD tool
Aaron Zeckoski
aaronz at vt.edu
Mon May 11 07:27:01 PDT 2009
Right, which line is it? (Can you mark it or paste the actual line itself)
-AZ
On Mon, May 11, 2009 at 3:24 PM, menjuanpablo <menjuanpablo at gmail.com> wrote:
>
> hi,
> the line 98 is in the fuction getallvisibleitems
>
>> org.sakaiproject.otrotodo.logic.OtrotodoLogic#getAllVisibleItems(java.lang.String,
>> java.lang.String)
>> */
>> 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
>> >>> for (int i=l.size()-1; i >= 0; i--)
>> {<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>> 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-tp23437843p23484347.html
> Sent from the Sakai - Development mailing list archive at Nabble.com.
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
--
Aaron Zeckoski (aaronz at vt.edu)
Senior Research Engineer - CARET - Cambridge University
[http://bugs.sakaiproject.org/confluence/display/~aaronz/]
Sakai Fellow - [http://aaronz-sakai.blogspot.com/]
More information about the sakai-dev
mailing list