/** * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#getGroups() */ @Override protected List<CmsGroup> getGroups() throws CmsException { return CmsPrincipal.filterCoreGroups(OpenCms.getRoleManager().getManageableGroups(getCms(), "", true)); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsUserGroupsList#getGroups(boolean) */ @Override protected List<CmsGroup> getGroups(boolean withOtherOus) throws CmsException { List<CmsGroup> usergroups = getCms().getGroupsOfUser(getParamUsername(), false, withOtherOus); List<CmsGroup> groups; if (withOtherOus) { groups = OpenCms.getRoleManager().getManageableGroups(getCms(), "", true); } else { groups = OpenCms.getRoleManager().getManageableGroups(getCms(), getParamOufqn(), false); } groups.removeAll(usergroups); return groups; }
/** * Returns the groups to show for selection.<p> * * @return A list of group objects * * @throws CmsException if womething goes wrong */ protected List getGroups() throws CmsException { List ret = new ArrayList(); if (getParamUser() != null) { ret.addAll(getCms().getGroupsOfUser(getParamUser(), false)); } else { ret.addAll(OpenCms.getRoleManager().getManageableGroups(getCms(), "", true)); } if (getParamFlags() != null) { int flags = Integer.parseInt(getParamFlags()); ret = CmsPrincipal.filterFlag(ret, flags); } if ((getParamOufqn() != null) && !getParamOufqn().equals("null")) { Iterator itTempRet = ret.iterator(); while (itTempRet.hasNext()) { CmsGroup group = (CmsGroup)itTempRet.next(); if (!group.getOuFqn().startsWith(getParamOufqn())) { itTempRet.remove(); } } } return ret; }
/** * Returns the groups to show for selection.<p> * * @return A list of group objects * * @throws CmsException if womething goes wrong */ protected List<CmsGroup> getGroups() throws CmsException { List<CmsGroup> groups = new ArrayList<CmsGroup>(); if (getParamUser() != null) { groups.addAll(getCms().getGroupsOfUser(getParamUser(), false)); } else { groups.addAll(OpenCms.getRoleManager().getManageableGroups(getCms(), "", true)); } if (getParamFlags() != null) { int flags = Integer.parseInt(getParamFlags()); CmsPrincipal.filterFlag(groups, flags); } if ((getParamOufqn() != null) && !getParamOufqn().equals("null")) { Iterator<CmsGroup> groupsIter = groups.iterator(); while (groupsIter.hasNext()) { CmsGroup group = groupsIter.next(); if (!group.getOuFqn().startsWith(getParamOufqn())) { groupsIter.remove(); } } } return groups; }
principals.addAll(OpenCms.getRoleManager().getManageableGroups(getCms(), "", true));
if (includeOtherOus) { principals.addAll(OpenCms.getRoleManager().getManageableGroups(getCms(), "", true));