Package com.baasbox.exception

Examples of com.baasbox.exception.SwitchUserContextException


        return excludeInternal ? isAdminRole && !BBConfiguration.getBaasBoxAdminUsername().equals(user.getName()) : isAdminRole;
    }


  public static ODatabaseRecordTx reconnectAsAdmin (){
    if (tranCount.get()>0) throw new SwitchUserContextException("Cannot switch to admin context within an open transaction");
    getConnection().close();
    try {
      return open (appcode.get(),BBConfiguration.getBaasBoxAdminUsername(),BBConfiguration.getBaasBoxAdminPassword());
    } catch (InvalidAppCodeException e) {
      throw new RuntimeException(e);
View Full Code Here


      throw new RuntimeException(e);
    }
  }

  public static ODatabaseRecordTx reconnectAsAuthenticatedUser (){
    if (tranCount.get()>0) throw new SwitchUserContextException("Cannot switch to user context within an open transaction");
    getConnection().close();
    try {
      return open (appcode.get(),getCurrentHTTPUsername(),getCurrentHTTPPassword());
    } catch (InvalidAppCodeException e) {
      throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of com.baasbox.exception.SwitchUserContextException

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.