Ok, I'm trying to get an instance of a Portlet object so I can check permissions like so:
JetspeedSecurity.checkPermission((JetspeedUser) data.getUser(), portlet, "view") I'm doing this in left.jsp, so I need to generate the instance by name. After much trial and error, I've discovered a method that works (querying the profiles, iterating through trying to get portlets by name). There really must be a better way, and I'm hoping that someone can make a suggestion. Here's what I'm doing now: QueryLocator qLoc = new QueryLocator(QueryLocator.QUERY_ROLE); qLoc.setRoleByName("user"); qLoc.setUser((JetspeedUser) data.getUser()); Portlet portlet = null; Iterator i = Profiler.query(qLoc); while (i.hasNext()) { Profile profile = (Profile) i.next(); if (profile.getRootSet().getPortletByName("files") != null) { String name = profile.getRootSet().getPortletByName("files").getName(); if (name.equalsIgnoreCase("files")) { portlet = profile.getRootSet().getPortletByName("files"); break; } } } Ugly, especially in JSP. Any ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]