class PersonalAccountPermissionsChecker implements AccountPermissionsChecker {

  @Override
  public void checkPermissions(String id, AccountOperation operation) throws ForbiddenException {
    // ignore action because user should be able to do anything in his personal account
    if (!EnvironmentContext.getCurrent().getSubject().getUserId().equals(id)) {
      throw new ForbiddenException("User is not authorized to use specified account");
    }
  }

}