本文整理了Java中alluxio.security.authorization.Mode.extractOtherBits()
方法的一些代码示例,展示了Mode.extractOtherBits()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mode.extractOtherBits()
方法的具体详情如下:
包路径:alluxio.security.authorization.Mode
类名称:Mode
方法名:extractOtherBits
暂无
代码示例来源:origin: Alluxio/alluxio
/**
* @return other actions
*/
public AclActions getOtherActions() {
return Mode.extractOtherBits(mMode).toAclActions();
}
代码示例来源:origin: Alluxio/alluxio
@Override
public String toString() {
if (mSrcInode != null) {
short mode = mSrcInode.getMode();
return String.format(
"succeeded=%b\tallowed=%b\tugi=%s (AUTH=%s)\tip=%s\tcmd=%s\tsrc=%s\tdst=%s\t"
+ "perm=%s:%s:%s%s%s",
mSucceeded, mAllowed, mUgi, mAuthType, mIp, mCommand, mSrcPath, mDstPath,
mSrcInode.getOwner(), mSrcInode.getGroup(),
Mode.extractOwnerBits(mode), Mode.extractGroupBits(mode), Mode.extractOtherBits(mode));
} else {
return String.format(
"succeeded=%b\tallowed=%b\tugi=%s (AUTH=%s)\tip=%s\tcmd=%s\tsrc=%s\tdst=%s\t"
+ "perm=null",
mSucceeded, mAllowed, mUgi, mAuthType, mIp, mCommand, mSrcPath, mDstPath);
}
}
}
代码示例来源:origin: org.alluxio/alluxio-core-server-master
@Override
public Mode.Bits getPermission(String user, List<String> groups, Inode<?> inode) {
short mode = inode.getMode();
if (user.equals(inode.getOwner())) {
return Mode.extractOwnerBits(mode);
}
if (groups.contains(inode.getGroup())) {
return Mode.extractGroupBits(mode);
}
return Mode.extractOtherBits(mode);
}
}
代码示例来源:origin: org.alluxio/alluxio-core-server-master
@Override
public String toString() {
if (mSrcInode != null) {
short mode = mSrcInode.getMode();
return String.format(
"succeeded=%b\tallowed=%b\tugi=%s (AUTH=%s)\tip=%s\tcmd=%s\tsrc=%s\tdst=%s\t"
+ "perm=%s:%s:%s%s%s",
mSucceeded, mAllowed, mUgi, mAuthType, mIp, mCommand, mSrcPath, mDstPath,
mSrcInode.getOwner(), mSrcInode.getGroup(),
Mode.extractOwnerBits(mode), Mode.extractGroupBits(mode), Mode.extractOtherBits(mode));
} else {
return String.format(
"succeeded=%b\tallowed=%b\tugi=%s (AUTH=%s)\tip=%s\tcmd=%s\tsrc=%s\tdst=%s\t"
+ "perm=null",
mSucceeded, mAllowed, mUgi, mAuthType, mIp, mCommand, mSrcPath, mDstPath);
}
}
}
代码示例来源:origin: org.alluxio/alluxio-core-server-master
@Override
public boolean checkPermission(String user, List<String> groups, Inode<?> inode,
Mode.Bits permission) {
short mode = inode.getMode();
if (user.equals(inode.getOwner())) {
return Mode.extractOwnerBits(mode).imply(permission);
}
if (groups.contains(inode.getGroup())) {
return Mode.extractGroupBits(mode).imply(permission);
}
return Mode.extractOtherBits(mode).imply(permission);
}
内容来源于网络,如有侵权,请联系作者删除!