Package com.liferay.portal.auth

Examples of com.liferay.portal.auth.PrincipalException


    throws PortalException, SystemException {

    userId = userId.trim().toLowerCase();

    if (!getUserId().equals(userId) && !hasAdmin(userId)) {
      throw new PrincipalException();
    }

    ImageLocalUtil.put(userId, bytes);
  }
View Full Code Here


    User user = UserUtil.findByPrimaryKey(userId);

    if (!getUserId().equals(userId) &&
      !hasAdministrator(user.getCompanyId())) {

      throw new PrincipalException();
    }

    return UserLocalManagerUtil.updateUser(
      userId, password1, password2, passwordReset);
  }
View Full Code Here

    User user = UserUtil.findByPrimaryKey(userId);

    if (!getUserId().equals(userId) &&
      !hasAdministrator(user.getCompanyId())) {

      throw new PrincipalException();
    }

    return UserLocalManagerUtil.updateUser(
      userId, password, firstName, middleName, lastName, nickName, male,
      birthday, emailAddress, smsId, aimId, icqId, msnId, ymId,
View Full Code Here

//    PortletPreferencesManagerUtil.deleteAllByGroup(groupId);

    String companyId = getUser().getCompanyId();

    if (!hasAdministrator(companyId)) {
      throw new PrincipalException();
    }

    groupId = _SHARED_KEY;

//    try {
View Full Code Here

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }

    company.setPortalURL(portalURL);
    company.setHomeURL(homeURL);
View Full Code Here

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }

    User defaultUser =
      UserLocalManagerUtil.getDefaultUser(company.getCompanyId());
View Full Code Here

  public void updateLogo(File file) throws PortalException, SystemException {
    String companyId = getUser().getCompanyId();

    if (!hasAdministrator(companyId)) {
      throw new PrincipalException();
    }

    try {
      ImageLocalUtil.put(companyId, FileUtil.getBytes(file));
View Full Code Here

    Company company =
      CompanyUtil.findByPrimaryKey(getUser().getCompanyId());

    if (!hasAdministrator(company.getCompanyId())) {
      throw new PrincipalException();
    }
    user.setLanguageId(languageId);
    user.setTimeZoneId(timeZoneId);
    user.setSkinId(skinId);
    user.setDottedSkins(dottedSkins);
View Full Code Here

  public void deleteQuestion(String questionId)
    throws PortalException, SystemException {

    if (!hasAdmin(questionId)) {
      throw new PrincipalException();
    }

    PollsQuestionLocalManagerUtil.deleteQuestion(questionId);
  }
View Full Code Here

      String questionId, String title, String description, int expMonth,
      int expDay, int expYear, boolean neverExpires, List choices)
    throws PortalException, SystemException {

    if (!hasAdmin(questionId)) {
      throw new PrincipalException();
    }

    return PollsQuestionLocalManagerUtil.updateQuestion(
      getUserId(), questionId, title, description, expMonth, expDay,
      expYear, neverExpires, choices);
View Full Code Here

TOP

Related Classes of com.liferay.portal.auth.PrincipalException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.