code: public <T> T executeWithTxUser(final String user, final SpecificUserAction<T> userAction) {
          final boolean userChanged = checkSpecificUserConditions(user);
          final ODatabaseDocument db = connectionProvider.get();
          final T res;
          if (userChanged) {
              // this may cause security exception if current user has no access rights to users table
              final OUser specificUser = db.getMetadata().getSecurity().getUser(user);
              Preconditions.checkState(specificUser != null, "User '%s' not found", user);
              res = executeWithTxUser(specificUser, userAction);
          } else {
              res = executeWithTxUser(db.getUser(), userAction);
          }
          return res;
      }
docs: Changes current connection user. See {@link #executeWithTxUser(
  com.orientechnologies.orient.core.metadata.security.OSecurityUser, SpecificUserAction)}.
  <p>
  LIMITATION: current user must have read right on users table.
  
  @param user       user login
  @param userAction logic to execute with specific user
  @param <T>        type of returned result (may be Void)
  @return action result (may be null)