Examples of checkSecurity()


Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecord.checkSecurity()

  }

  @SuppressWarnings("rawtypes")
  private boolean searchForIndexes(final OClass iSchemaClass) {
    final ODatabaseRecord database = getDatabase();
    database.checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_READ, iSchemaClass.getName().toLowerCase());

    // fetch all possible variants of subqueries that can be used in indexes.
    if (compiledFilter == null)
      if (orderedFields.size() == 0)
        return false;
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

  public Object execute(final Map<Object, Object> iArgs) {
    if (attribute == null)
      throw new OCommandExecutionException("Cannot execute the command because it has not been parsed yet");

    final ODatabaseRecordInternal database = getDatabase();
    database.checkSecurity(ODatabaseSecurityResources.DATABASE, ORole.PERMISSION_UPDATE);

    database.setInternal(attribute, value);
    return null;
  }
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

              clusterIds[i] = database.addCluster(className + "_" + i);
          }
      } else
        clusterIds = clusterIdsToAdd;

      database.checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_CREATE);

      final String key = className.toLowerCase();

      if (classes.containsKey(key))
        throw new OSchemaException("Class " + className + " already exists in current database");
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

    if (db != null && !(db instanceof ODatabaseRecordTx))
      db = db.getUnderlying();

    final OFunction f = db.getMetadata().getFunctionLibrary().getFunction(parserText);

    db.checkSecurity(ODatabaseSecurityResources.FUNCTION, ORole.PERMISSION_READ, f.getName());

    final OScriptManager scriptManager = Orient.instance().getScriptManager();
    final ScriptEngine scriptEngine = scriptManager.getEngine(f.getLanguage());
    final Bindings binding = scriptManager.bind(scriptEngine.getBindings(ScriptContext.ENGINE_SCOPE), (ODatabaseRecordTx) db,
        iContext, iArgs);
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

  protected void searchInClasses(final boolean iAscendentOrder) {
    final OClass cls = parsedTarget.getTargetClasses().keySet().iterator().next();

    final ODatabaseRecordInternal database = getDatabase();
    database.checkSecurity(ODatabaseSecurityResources.CLASS, ORole.PERMISSION_READ, cls.getName().toLowerCase());

    // NO INDEXES: SCAN THE ENTIRE CLUSTER

    OStorage.LOCKING_STRATEGY locking = context != null && context.getVariable("$locking") != null ? (OStorage.LOCKING_STRATEGY) context
        .getVariable("$locking") : OStorage.LOCKING_STRATEGY.DEFAULT;
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

    final Set<Integer> clusterIds = new HashSet<Integer>();
    for (String clusterName : parsedTarget.getTargetClusters().keySet()) {
      if (clusterName == null || clusterName.length() == 0)
        throw new OCommandExecutionException("No cluster or schema class selected in query");

      database.checkSecurity(ODatabaseSecurityResources.CLUSTER, ORole.PERMISSION_READ, clusterName.toLowerCase());

      if (Character.isDigit(clusterName.charAt(0))) {
        // GET THE CLUSTER NUMBER
        for (int clusterId : OStringSerializerHelper.splitIntArray(clusterName)) {
          if (clusterId == -1)
View Full Code Here

Examples of com.orientechnologies.orient.core.db.record.ODatabaseRecordInternal.checkSecurity()

    if (getDatabase().getTransaction().isActive())
      throw new OSchemaException("Cannot create a new property inside a transaction");

    final ODatabaseRecordInternal database = getDatabase();
    database.checkSecurity(ODatabaseSecurityResources.SCHEMA, ORole.PERMISSION_UPDATE);

    checkPersistentPropertyType(database, propertyName, type);
    OProperty property = null;
    acquireSchemaWriteLock();
    try {
View Full Code Here

Examples of com.tuscanyscatours.payment.creditcard.CreditCardSecurity.checkSecurity()

          // using injected callback proxy
            pwd = ccSecurity.checkSecurity("Enter password");
        } else {
          // using request context to get callback proxy
            CreditCardSecurity ccSecurity = rqContext.getCallback();
            pwd = ccSecurity.checkSecurity("Enter password");
        }

        if (verifyPassword(card, pwd)) {
          break;
        }
View Full Code Here

Examples of org.ow2.easybeans.api.EZBPermissionManager.checkSecurity()

        boolean accessGranted = true;
        boolean runAsBean = invocationContext.getFactory().getBeanInfo().getSecurityInfo().getRunAsRole() != null;
        try {
            EZBPermissionManager permissionManager = invocationContext.getFactory().getContainer().getPermissionManager();
            if (permissionManager != null) {
                accessGranted = permissionManager.checkSecurity(invocationContext, runAsBean);
            }
        } finally {
            PolicyContext.setContextID(oldContextId);
        }
        if (!accessGranted) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.