PortalRequestContext pcontext = Util.getPortalRequestContext();
UserPortalConfigService configService = getApplicationComponent(UserPortalConfigService.class);
List<SelectItemOption<String>> ownerTypes = new ArrayList<SelectItemOption<String>>();
ownerTypes.add(new SelectItemOption<String>(PortalConfig.USER_TYPE));
UserPortalConfig userPortalConfig =
configService.getUserPortalConfig(pcontext.getPortalOwner(), pcontext.getRemoteUser());
ExoContainer container = ExoContainerContext.getCurrentContainer();
UserACL acl = (UserACL)container.getComponentInstanceOfType(UserACL.class);
if (acl.hasEditPermission(userPortalConfig.getPortalConfig()))
{
ownerTypes.add(new SelectItemOption<String>(PortalConfig.PORTAL_TYPE));
}
ownerIdInput = new UIFormStringInput(OWNER_ID, OWNER_ID, null);
ownerIdInput.setEditable(false).setValue(pcontext.getRemoteUser());