/** * Sets the access flags to identify the given principal type.<p> * * @param principal the principal to set the flags for */ public void setFlagsForPrincipal(I_CmsPrincipal principal) { setFlags( principal.isGroup() ? CmsAccessControlEntry.ACCESS_FLAGS_GROUP : CmsAccessControlEntry.ACCESS_FLAGS_USER); }
/** * Sets the access flags to identify the given principal type.<p> * * @param principal the principal to set the flags for */ public void setFlagsForPrincipal(I_CmsPrincipal principal) { setFlags(principal.isGroup() ? CmsAccessControlEntry.ACCESS_FLAGS_GROUP : CmsAccessControlEntry.ACCESS_FLAGS_USER); }
/** * Returns the set of users that are responsible for a specific resource.<p> * * @param dbc the current database context * @param resource the resource to get the responsible users from * * @return the set of users that are responsible for a specific resource * * @throws CmsException if something goes wrong */ public Set<CmsUser> readResponsibleUsers(CmsDbContext dbc, CmsResource resource) throws CmsException { Set<CmsUser> result = new HashSet<CmsUser>(); Iterator<I_CmsPrincipal> principals = readResponsiblePrincipals(dbc, resource).iterator(); while (principals.hasNext()) { I_CmsPrincipal principal = principals.next(); if (principal.isGroup()) { try { result.addAll(getUsersOfGroup(dbc, principal.getName(), true, false, false)); } catch (CmsException e) { if (LOG.isInfoEnabled()) { LOG.info(e); } } } else { result.add((CmsUser)principal); } } return result; }
/** * Contains the visibility handler configuration for a content field path.<p> */ protected static class VisibilityConfiguration { /** The handler instance. */ private I_CmsXmlContentVisibilityHandler m_handler; /** The handler configuration parameters. */ private String m_params; /** * Constructor.<p> * * @param handler the handler instance * @param params the handler configuration parameteres */ protected VisibilityConfiguration(I_CmsXmlContentVisibilityHandler handler, String params) { m_handler = handler; m_params = params; } /** * Returns the visibility handler instance.<p> * * @return the handler instance */ public I_CmsXmlContentVisibilityHandler getHandler() {
if (principal.isGroup()) { rootCms.rmacc(filename, I_CmsPrincipal.PRINCIPAL_GROUP, principal.getName()); } else if (principal.isUser()) {
String ou = null; int flags = 0; if ((principal != null) && principal.isGroup()) { name = key(org.opencms.security.Messages.GUI_ORGUNIT_DISPLAY_NAME_2, new Object[] { ((CmsGroup)principal).getDescription(getLocale()),
I_CmsPrincipal principal = (I_CmsPrincipal)entry.getKey(); if (principal instanceof CmsHistoryPrincipal) { if (principal.isGroup()) { name = ((CmsHistoryPrincipal)principal).getDescription() + " ("
if ((principal != null) && (principal instanceof CmsHistoryPrincipal)) { if (principal.isGroup()) { String niceName = OpenCms.getWorkplaceManager().translateGroupName(principal.getName(), false); name = key( flags = CmsAccessControlEntry.ACCESS_FLAGS_USER; } else if ((principal != null) && principal.isGroup()) { String niceName = OpenCms.getWorkplaceManager().translateGroupName(principal.getName(), false); name = key(
p = null; if ((p != null) && p.isGroup()) { flags = CmsAccessControlEntry.ACCESS_FLAGS_GROUP; } else if ((p != null) && p.isUser()) {
principal.getName(), principal.getDescription(), principal.isGroup()); if (!resource.getRootPath().equals(res.getRootPath())) { if (resource.getRootPath().startsWith(storedSiteRoot)) {
p = null; if ((p != null) && p.isGroup()) { flags = CmsAccessControlEntry.ACCESS_FLAGS_GROUP; } else if ((p != null) && p.isUser()) {
p = null; if ((p != null) && p.isGroup()) { flags = CmsAccessControlEntry.ACCESS_FLAGS_GROUP; } else if ((p != null) && p.isUser()) {
if (principal.isGroup()) { item.set(LIST_COLUMN_DISPLAY, translation.translateGroupName(principal.getName(), false)); } else {
if ((principal != null) && (principal instanceof CmsHistoryPrincipal)) { if (principal.isGroup()) { String niceName = OpenCms.getWorkplaceManager().translateGroupName(principal.getName(), false); displayName = CmsVaadinUtils.getMessageText( flags = CmsAccessControlEntry.ACCESS_FLAGS_USER; } else if ((principal != null) && principal.isGroup()) { String niceName = OpenCms.getWorkplaceManager().translateGroupName(principal.getName(), false); displayName = CmsVaadinUtils.getMessageText(