Package com.cloudera.lib.service

Examples of com.cloudera.lib.service.ACL


    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    Assert.assertNotNull(acl);
    server.destroy();
  }
View Full Code Here


    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    acl.validate(user, user, null);
    acl.validate(user, user, user);

    server.destroy();
  }
View Full Code Here

    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    acl.validate(user, "root", user);

    server.destroy();
  }
View Full Code Here

    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    String group = groups.getGroups(user).get(0);
    acl.validate(user, "root", "bar," + group);
    server.destroy();
  }
View Full Code Here

    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    acl.validate(user, "root", "nobody");
    server.destroy();
  }
View Full Code Here

    XConfiguration conf = new XConfiguration();
    conf.set("server.services", StringUtils.toString(Arrays.asList(GroupsService.class.getName(),
                                                                   ACLService.class.getName()), ","));
    Server server = new Server("server", dir, dir, dir, dir, conf);
    server.init();
    ACL acl = server.get(ACL.class);
    String user = System.getProperty("user.name");
    Groups groups = server.get(Groups.class);
    acl.validate(user, "root", null);
    server.destroy();
  }
View Full Code Here

TOP

Related Classes of com.cloudera.lib.service.ACL

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.