// determine its current lifecycle state
PortletCategory category = PortletCategoryRegistryLocator.getPortletCategoryRegistry().getPortletCategory(categoryId);
if (category == null){
// return doesPrincipalHavePermission(principal, owner,
// IPermission.CHANNEL_MANAGER_APPROVED_ACTIVITY, target);
throw new AuthorizationException("Unable to locate category " + categoryId);
}
int order = state.getOrder();
String activity = IPermission.PORTLET_MANAGER_MAINTENANCE_ACTIVITY;
if (order <= PortletLifecycleState.MAINTENANCE.getOrder()