/** * 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); }
/** * @see org.opencms.security.I_CmsPrincipal#setName(java.lang.String) */ public void setName(String name) { checkName(CmsOrganizationalUnit.getSimpleName(name)); m_name = name; } }
/** * @see org.opencms.security.CmsDefaultAuthorizationHandler#initCmsObject(javax.servlet.http.HttpServletRequest, org.opencms.security.I_CmsAuthorizationHandler.I_PrivilegedLoginAction) */ @Override public CmsObject initCmsObject(HttpServletRequest request, I_PrivilegedLoginAction loginAction) { CmsObject cms = initCmsObjectFromToken(request, loginAction); if (cms == null) { cms = super.initCmsObject(request, loginAction); } return cms; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters OpenCms.getRoleManager().checkRole(getCms(), CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParamOufqn())); OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), m_paramOufqn).getName(); } }
/** * Calculates the permissions of the given user and his groups from the access control list.<p> * The permissions are returned as permission string in the format {{+|-}{r|w|v|c|i}}*. * * @param user the user * @param groups the groups of this user * @param roles the roles of this user * * @return a string that displays the permissions */ public String getPermissionString(CmsUser user, List<CmsGroup> groups, List<CmsRole> roles) { return getPermissions(user, groups, roles).getPermissionString(); }
/** * Returns the String representation of this permission set object.<p> * * @see java.lang.Object#toString() */ @Override public String toString() { return "[PermissionSet:] " + getPermissionString(); } }
/** * Returns the string representation of the "inherit" flag.<p> * * @return string of the format {{+|-}i}* */ public String getInheritingString() { if (isInheriting()) { return "+i"; } else { return "-i"; } }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsSecurityException(container, cause); } }
/** * Returns the simple name of this organizational unit. * * @return the simple name of this organizational unit. */ public String getSimpleName() { return CmsOrganizationalUnit.getSimpleName(m_name); }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsAuthentificationException(container, cause); } }
/** * Checks if this organizational unit has the "hide from login form" flag set.<p> * * @return <code>true</code> if this organizational unit has the "hide from login form" flag set */ public boolean hasFlagHideLogin() { return hasFlag(FLAG_HIDE_LOGIN); }
/** * Returns the currently allowed permissions as bitset.<p> * * @return the allowed permissions */ public int getAllowedPermissions() { return m_permissions.getAllowedPermissions(); }
/** * Returns the currently denied permissions as bitset.<p> * * @return the denied permissions */ public int getDeniedPermissions() { return m_permissions.getDeniedPermissions(); }
/** * Returns a clone of this Objects instance.<p> * * @return a clone of this instance */ @Override public Object clone() { return new CmsPermissionSetCustom(m_allowed, m_denied); }
/** * @see org.opencms.main.CmsException#createException(org.opencms.i18n.CmsMessageContainer, java.lang.Throwable) */ @Override public CmsException createException(CmsMessageContainer container, Throwable cause) { return new CmsUserDisabledException(container, cause); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters OpenCms.getRoleManager().checkRole(getCms(), CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParamOufqn())); OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn()).getName(); }
/** * 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); }
/** * @see org.opencms.security.I_CmsPrincipal#setName(java.lang.String) */ public void setName(String name) { checkName(CmsOrganizationalUnit.getSimpleName(name)); m_name = name; } }
/** * Calculates the permissions of the given user and his groups from the access control list.<p> * The permissions are returned as permission string in the format {{+|-}{r|w|v|c|i}}*. * * @param user the user * @param groups the groups of this user * @param roles the roles of this user * * @return a string that displays the permissions */ public String getPermissionString(CmsUser user, List groups, List roles) { return getPermissions(user, groups, roles).getPermissionString(); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { OpenCms.getRoleManager().checkRole(getCms(), CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParamOufqn())); if (!isNewOrgUnit()) { // test the needed parameters OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn()).getName(); } } }