Tabnine Logo
AccessControlList.removeUser
Code IndexAdd Tabnine to your IDE (free)

How to use
removeUser
method
in
org.apache.hadoop.security.authorize.AccessControlList

Best Java code snippets using org.apache.hadoop.security.authorize.AccessControlList.removeUser (Showing top 9 results out of 315)

origin: org.apache.hadoop/hadoop-common-test

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: org.apache.hadoop/hadoop-common-test

/**
 * Tests adding user/group to an wild card acl.
 */
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: ch.cern.hadoop/hadoop-common

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: com.github.jiayuhan-it/hadoop-common

assertEquals("drwho,joe tardis,users", acl.getAclString());
acl.removeUser("joe");
acl.removeGroup("users");
users = acl.getUsers();
assertEquals("drwho ", acl.getAclString());
acl.removeUser("drwho");
assertEquals(0, users.size());
assertFalse(users.contains("drwho"));
origin: org.apache.hadoop/hadoop-common-test

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
origin: ch.cern.hadoop/hadoop-common

/**
 * Tests adding user/group to an wild card acl.
 */
@Test
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: com.github.jiayuhan-it/hadoop-common

/**
 * Tests adding user/group to an wild card acl.
 */
@Test
public void testAddRemoveToWildCardACL() {
 AccessControlList acl = new AccessControlList(" * ");
 assertTrue(acl.isAllAllowed());
 UserGroupInformation drwho =
  UserGroupInformation.createUserForTesting("drwho@APACHE.ORG",
    new String[] { "aliens" });
 UserGroupInformation drwho2 =
  UserGroupInformation.createUserForTesting("drwho2@APACHE.ORG",
    new String[] { "tardis" });
 acl.addUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("drwho"));
 acl.addGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertFalse(acl.getAclString().contains("tardis"));
  acl.removeUser("drwho");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho, acl);
 acl.removeGroup("tardis");
 assertTrue(acl.isAllAllowed());
 assertUserAllowed(drwho2, acl);
}
origin: ch.cern.hadoop/hadoop-common

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
origin: com.github.jiayuhan-it/hadoop-common

th = null;
try {
acl.removeUser(" * ");
} catch (Throwable t) {
 th = t;
org.apache.hadoop.security.authorizeAccessControlListremoveUser

Javadoc

Remove user from the names of users allowed for this service.

Popular methods of AccessControlList

  • <init>
    Construct a new ACL from String representation of users and groups The arguments are comma separated
  • isUserAllowed
  • getAclString
    Returns the access control list as a String that can be used for building a new instance by sending
  • addUser
    Add user to the names of users allowed for this service.
  • isAllAllowed
  • toString
    Returns descriptive way of users and groups that are part of this ACL. Use #getAclString() to get th
  • getGroups
  • addGroup
    Add group to the names of groups allowed for this service.
  • isUserInList
    Checks if a user represented by the provided UserGroupInformationis a member of the Access Control L
  • buildACL
    Build ACL from the given two Strings. The Strings contain comma separated values.
  • getGroupsString
    Returns comma-separated concatenated single String of the set 'groups'
  • getString
    Returns comma-separated concatenated single String of all strings of the given set
  • getGroupsString,
  • getString,
  • getUsersString,
  • isWildCardACLValue,
  • readFields,
  • write,
  • getUsers,
  • removeGroup

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • findViewById (Activity)
  • getApplicationContext (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now