/** * Delegate method for {@link CmsObject#readUser(CmsUUID)}.<p> * * @see CmsObject#readUser(CmsUUID) * * @param userId the id of the user to be read * * @return the user with the given id * * @throws CmsException if something goes wrong */ public CmsUser readUser(CmsUUID userId) throws CmsException { return m_cms.readUser(userId); }
/** * Delegate method for {@link CmsObject#readUser(CmsUUID)}.<p> * * @see CmsObject#readUser(CmsUUID) * * @param userId the id of the user to be read * * @return the user with the given id * * @throws CmsException if something goes wrong */ public CmsUser readUser(CmsUUID userId) throws CmsException { return m_cms.readUser(userId); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsUsersList#readUser(java.lang.String) */ @Override protected CmsUser readUser(String name) throws CmsException { return getCms().readUser(name); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsUsersList#readUser(java.lang.String) */ @Override protected CmsUser readUser(String name) throws CmsException { return getCms().readUser(name); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { m_userName = ""; Iterator itUsers = CmsStringUtil.splitAsList(getParamUserid(), CmsHtmlList.ITEM_SEPARATOR, true).iterator(); while (itUsers.hasNext()) { CmsUUID id = new CmsUUID(itUsers.next().toString()); m_userName += getCms().readUser(id).getName(); if (itUsers.hasNext()) { m_userName += CmsHtmlList.ITEM_SEPARATOR; } } }
/** * Initializes the user object.<p> */ protected void initUserObject() { try { // edit an existing user, get the user object from db m_user = getCms().readUser(new CmsUUID(getParamUserid())); } catch (CmsException e) { // should never happen } }
/** * Initializes the user object to work with depending on the dialog state and request parameters.<p> */ protected void initUserObject() { try { m_user = getCms().readUser(new CmsUUID(getParamUserid())); return; } catch (Exception e) { // noop } }
/** * Moves an user to the given organizational unit.<p> * * @param cms the opencms context * @param ouFqn the full qualified name of the organizational unit to add the user to * @param userName the name of the user that is to be added to the organizational unit * * @throws CmsException if something goes wrong */ public void setUsersOrganizationalUnit(CmsObject cms, String ouFqn, String userName) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); CmsUser user = cms.readUser(userName); m_securityManager.setUsersOrganizationalUnit(cms.getRequestContext(), orgUnit, user); }
/** * Moves an user to the given organizational unit.<p> * * @param cms the opencms context * @param ouFqn the full qualified name of the organizational unit to add the user to * @param userName the name of the user that is to be added to the organizational unit * * @throws CmsException if something goes wrong */ public void setUsersOrganizationalUnit(CmsObject cms, String ouFqn, String userName) throws CmsException { CmsOrganizationalUnit orgUnit = readOrganizationalUnit(cms, ouFqn); CmsUser user = cms.readUser(userName); m_securityManager.setUsersOrganizationalUnit(cms.getRequestContext(), orgUnit, user); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters m_paramUsername = getCms().readUser(new CmsUUID(getParamUserid())).getName(); } }
/** * Returns the user who made the last changes to the current resource.<p> * * @return the user who changed the resource */ protected String getLastModifiedUser() { CmsUUID userId = getCurrentResource().getUserLastModified(); try { return getCms().readUser(userId).getName(); } catch (CmsException e) { return ""; } }
/** * Returns the user who made the last changes to the current resource.<p> * * @return the user who changed the resource */ protected String getLastModifiedUser() { CmsUUID userId = getCurrentResource().getUserLastModified(); try { return getCms().readUser(userId).getName(); } catch (CmsException e) { return ""; } }
/** * Unlocks the user.<p> * * @throws Exception if something goes wrong */ public void actionKillUserSessions() throws Exception { CmsUUID userId = new CmsUUID(m_paramUserId); CmsObject cms = getCms(); CmsUser user = cms.readUser(userId); OpenCms.getSessionManager().killSession(cms, user); actionCloseDialog(); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#writeDialog() */ @Override public void writeDialog() throws IOException { try { if (!getCms().readUser(new CmsUUID(getParamUserid())).isWebuser()) { super.writeDialog(); } } catch (CmsException e) { // ignore } }
/** * Unlocks the user.<p> * * @throws Exception if something goes wrong */ public void actionUnlockUser() throws Exception { CmsUUID userId = new CmsUUID(m_paramUserId); CmsObject cms = getCms(); CmsUser user = cms.readUser(userId); OpenCms.getLoginManager().unlockUser(getCms(), user); actionCloseDialog(); }
/** * Updates the user info.<p> */ void updateUserInfo() { try { m_user = m_context.getCms().readUser(m_user.getId()); m_userInfo.setValue( "<img src=\"" + OpenCms.getWorkplaceAppManager().getUserIconHelper().getSmallIconPath(m_context.getCms(), m_user) + "\" style=\"vertical-align:middle; margin: -4px 10px 0 0;\" />" + m_user.getName()); } catch (CmsException e) { LOG.error("Error updating user info.", e); } }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters String ou = getCms().readUser(new CmsUUID(getParamUserid())).getOuFqn(); OpenCms.getRoleManager().checkRole(getCms(), CmsRole.ACCOUNT_MANAGER.forOrgUnit(ou)); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { OpenCms.getRoleManager().checkRole(getCms(), CmsRole.ACCOUNT_MANAGER.forOrgUnit(getParamOufqn())); if (!isNewUser()) { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); } }