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

How to use
setOwningUser
method
in
alluxio.security.authorization.AccessControlList

Best Java code snippets using alluxio.security.authorization.AccessControlList.setOwningUser (Showing top 9 results out of 315)

origin: Alluxio/alluxio

/**
 * @param owner the owner name of the inode
 * @return the updated object
 */
public T setOwner(String owner) {
 mAcl.setOwningUser(owner);
 if (isDirectory()) {
  getDefaultACL().setOwningUser(owner);
 }
 return getThis();
}
origin: Alluxio/alluxio

acl.setOwningUser(owner);
acl.setOwningGroup(owningGroup);
origin: Alluxio/alluxio

/**
 * Tests getting and setting owner and group.
 */
@Test
public void ownerGroup() {
 AccessControlList acl = new AccessControlList();
 acl.setOwningUser(OWNING_USER);
 acl.setOwningGroup(OWNING_GROUP);
 Assert.assertEquals(OWNING_USER, acl.getOwningUser());
 Assert.assertEquals(OWNING_GROUP, acl.getOwningGroup());
}
origin: Alluxio/alluxio

/**
 * @param pAcl the proto representation
 * @return the {@link AccessControlList} instance created from the proto representation
 */
public static AccessControlList fromProto(PAcl pAcl) {
 AccessControlList acl;
 if (pAcl.getIsDefault()) {
  acl = new DefaultAccessControlList();
  ((DefaultAccessControlList) acl).setEmpty(pAcl.getIsDefaultEmpty());
 } else {
  acl = new AccessControlList();
 }
 acl.setOwningUser(pAcl.getOwner());
 acl.setOwningGroup(pAcl.getOwningGroup());
 acl.setMode((short) pAcl.getMode());
 if (pAcl.getEntriesCount() > 0) {
  for (PAclEntry tEntry : pAcl.getEntriesList()) {
   acl.setEntry(fromProto(tEntry));
  }
 }
 return acl;
}
origin: Alluxio/alluxio

acl.setOwningUser(OWNING_USER);
acl.setOwningGroup(OWNING_GROUP);
acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OWNING_USER).setSubject(OWNING_USER)
origin: Alluxio/alluxio

 ret = new AccessControlList();
ret.setOwningUser(acl.getOwningUser());
ret.setOwningGroup(acl.getOwningGroup());
origin: Alluxio/alluxio

acl.setOwningUser(entry.getOwner());
acl.setOwningGroup(entry.getGroup());
short mode = entry.hasMode() ? (short) entry.getMode() : Constants.DEFAULT_FILE_SYSTEM_MODE;
origin: Alluxio/alluxio

acl.setOwningUser(entry.getOwner());
acl.setOwningGroup(entry.getGroup());
short mode = entry.hasMode() ? (short) entry.getMode() : Constants.DEFAULT_FILE_SYSTEM_MODE;
origin: Alluxio/alluxio

private void setPermissions(AccessControlList acl) {
 // owning user: rwx
 // owning group: r-x
 // other: --x
 // named user: r-x
 // named group: r--
 // named group 2: -wx
 acl.setOwningUser(OWNING_USER);
 acl.setOwningGroup(OWNING_GROUP);
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OWNING_USER).setSubject(OWNING_USER)
   .addAction(AclAction.READ).addAction(AclAction.WRITE).addAction(AclAction.EXECUTE).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OWNING_GROUP).setSubject(OWNING_GROUP)
   .addAction(AclAction.READ).addAction(AclAction.EXECUTE).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.OTHER)
   .addAction(AclAction.EXECUTE).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.NAMED_USER).setSubject(NAMED_USER)
   .addAction(AclAction.READ).addAction(AclAction.EXECUTE).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.NAMED_GROUP).setSubject(NAMED_GROUP)
   .addAction(AclAction.READ).build());
 acl.setEntry(new AclEntry.Builder().setType(AclEntryType.NAMED_GROUP).setSubject(NAMED_GROUP2)
   .addAction(AclAction.WRITE).addAction(AclAction.EXECUTE).build());
 acl.updateMask();
}
alluxio.security.authorizationAccessControlListsetOwningUser

Javadoc

Sets owning user.

Popular methods of AccessControlList

  • <init>
    Creates a new instance where owning user and owning group are initialized to empty strings, and no a
  • getEntries
    Returns a list of AclEntry which represent this ACL instance. The mask will only be included if exte
  • getOwningGroup
  • getOwningUser
  • hasExtended
  • setEntry
    Sets an entry into the access control list. If an entry with the same type and subject already exist
  • setOwningGroup
    Sets owning group.
  • getMode
  • getPermission
    Gets the permitted actions for a user. When AccessControlList is not modified after calling getPermi
  • setMode
    Sets permitted actions for owning user, owning group, and other based on the mode. The format of mod
  • toString
  • toStringEntries
  • toString,
  • toStringEntries,
  • checkPermission,
  • clearEntries,
  • fromStringEntries,
  • getOtherActions,
  • getOwningGroupActions,
  • getOwningUserActions,
  • removeEntry

Popular in Java

  • Making http post requests using okhttp
  • findViewById (Activity)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • putExtra (Intent)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Reference (javax.naming)
  • Best IntelliJ plugins
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