Examples of checkPermissions()


Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

    }
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        new byte[0]);
      protocol.checkPermissions(perms);
    } finally {
      acl.close();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

  public void checkTablePerms(byte[] table, Permission... perms) throws IOException {
    HTable acl = new HTable(conf, table);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        new byte[0]);
      protocol.checkPermissions(perms);
    } finally {
      acl.close();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        TEST_TABLE);
      try {
        // but ask for TablePermissions for TEST_TABLE
        protocol.checkPermissions(new Permission[] { (Permission) new TablePermission(TEST_TABLE,
          null, (byte[]) null, Permission.Action.CREATE) });
        fail("this should have thrown CoprocessorException");
      } catch (CoprocessorException ex) {
        // expected
      }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

    }
    HTable acl = new HTable(conf, AccessControlLists.ACL_TABLE_NAME);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        new byte[0]);
      protocol.checkPermissions(perms);
    } finally {
      acl.close();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

  public void checkTablePerms(byte[] table, Permission... perms) throws IOException {
    HTable acl = new HTable(conf, table);
    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        new byte[0]);
      protocol.checkPermissions(perms);
    } finally {
      acl.close();
    }
  }
View Full Code Here

Examples of org.apache.hadoop.hbase.security.access.AccessControllerProtocol.checkPermissions()

    try {
      AccessControllerProtocol protocol = acl.coprocessorProxy(AccessControllerProtocol.class,
        TEST_TABLE);
      try {
        // but ask for TablePermissions for TEST_TABLE
        protocol.checkPermissions(new Permission[] { (Permission) new TablePermission(TEST_TABLE,
          null, (byte[]) null, Permission.Action.CREATE) });
        fail("this should have thrown CoprocessorException");
      } catch (CoprocessorException ex) {
        // expected
      }
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.security.AccessManager.checkPermissions()

        Tree src = root.getTree(srcPath);
        if (!src.exists()) {
            throw new PathNotFoundException(srcPath);
        }

        accessManager.checkPermissions(destPath, Permissions.getString(Permissions.NODE_TYPE_MANAGEMENT));

        try {
            new WorkspaceCopy(root, srcPath, destPath).perform();
            root.commit();
            sessionDelegate.refresh(true);
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.security.AccessManager.checkPermissions()

        Tree src = root.getTree(srcPath);
        if (!src.exists()) {
            throw new PathNotFoundException(srcPath);
        }

        accessManager.checkPermissions(destPath, Permissions.getString(Permissions.NODE_TYPE_MANAGEMENT));

        try {
            new WorkspaceCopy(root, srcPath, destPath).perform();
            context.getSessionDelegate().commit(root);
            sessionDelegate.refresh(true);
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.security.AccessManager.checkPermissions()

        }
        if (!src.exists()) {
            throw new PathNotFoundException(srcPath);
        }

        accessManager.checkPermissions(destPath, Permissions.getString(Permissions.NODE_TYPE_MANAGEMENT));

        String userId = sessionDelegate.getAuthInfo().getUserID();
        new WorkspaceCopy(src, destParent, Text.getName(destPath)).perform(root, userId);
        sessionDelegate.refresh(true);
    }
View Full Code Here

Examples of org.apache.jackrabbit.oak.jcr.security.AccessManager.checkPermissions()

        }
        if (!src.exists()) {
            throw new PathNotFoundException(srcPath);
        }

        accessManager.checkPermissions(destPath, Permissions.getString(Permissions.NODE_TYPE_MANAGEMENT));

        String userId = sessionDelegate.getAuthInfo().getUserID();
        new WorkspaceCopy(src, destParent, Text.getName(destPath)).perform(root, userId);
        sessionDelegate.refresh(true);
    }
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.