Package org.nemesis.forum.exception

Examples of org.nemesis.forum.exception.UnauthorizedException


  public void setNameVisible(boolean visible) throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN) || permissions.get(Constants.USER_ADMIN)) {
      user.setNameVisible(visible);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here


  public void setPassword(String password) throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN) || permissions.get(Constants.USER_ADMIN)) {
      user.setPassword(password);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

  public String getPasswordHash() throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN)) {
      return user.getPasswordHash();
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

  public void setPasswordHash(String passwordHash) throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN)) {
      user.setPasswordHash(passwordHash);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

  public void setEmail(String email) throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN) || permissions.get(Constants.USER_ADMIN)) {
      user.setEmail(email);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

  public void setEmailVisible(boolean visible) throws UnauthorizedException {
    if (permissions.get(Constants.SYSTEM_ADMIN) || permissions.get(Constants.USER_ADMIN)) {
      user.setEmailVisible(visible);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

 
  public void setApproved(boolean approved) throws UnauthorizedException {
    if (permissions.isSystemOrForumAdmin() || permissions.get(Constants.MODERATOR)) {
      thread.setApproved(approved);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

  public void setCreationDate(Date creationDate) throws UnauthorizedException {
    if (permissions.isSystemOrForumAdmin()) {
      thread.setCreationDate(creationDate);
    } else
      throw new UnauthorizedException();
  }
View Full Code Here

  public void setModifiedDate(Date modifiedDate) throws UnauthorizedException {
    if (permissions.isSystemOrForumAdmin()) {
      thread.setModifiedDate(modifiedDate);
    } else
      throw new UnauthorizedException();
  }
View Full Code Here

  public void deleteMessage(Message message) throws UnauthorizedException {
    if (permissions.isSystemOrForumAdmin() || permissions.get(Constants.MODERATOR)) {
      thread.deleteMessage(message);
    } else {
      throw new UnauthorizedException();
    }
  }
View Full Code Here

TOP

Related Classes of org.nemesis.forum.exception.UnauthorizedException

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.