public interface PermissionChecker
Modifier and Type | Method and Description |
---|---|
void |
checkParentPermission(Mode.Bits bits,
LockedInodePath inodePath)
Checks whether a user has permission to perform a specific action on the parent of the given
path; if parent directory does not exist, treats the closest ancestor directory of the path as
its parent and checks permission on it.
|
void |
checkPermission(Mode.Bits bits,
LockedInodePath inodePath)
Checks whether a user has permission to perform a specific action on a path.
|
void |
checkSetAttributePermission(LockedInodePath inodePath,
boolean superuserRequired,
boolean ownerRequired,
boolean writeRequired)
Checks whether a user has permission to edit the attribute of a given path.
|
Mode.Bits |
getPermission(LockedInodePath inodePath)
Gets the permission to access inodePath for the current client user.
|
void checkParentPermission(Mode.Bits bits, LockedInodePath inodePath) throws AccessControlException, InvalidPathException
bits
- bits that capture the action Mode.Bits
by userinodePath
- the path to check permission onAccessControlException
- if permission checking failsInvalidPathException
- if the path is invalidvoid checkPermission(Mode.Bits bits, LockedInodePath inodePath) throws AccessControlException
bits
- bits that capture the action Mode.Bits
by userinodePath
- the path to check permission onAccessControlException
- if permission checking failsInvalidPathException
- if the path is invalidMode.Bits getPermission(LockedInodePath inodePath)
inodePath
- the inode pathvoid checkSetAttributePermission(LockedInodePath inodePath, boolean superuserRequired, boolean ownerRequired, boolean writeRequired) throws AccessControlException, InvalidPathException
inodePath
- the path to check permission onsuperuserRequired
- indicates whether it requires to be the superuserownerRequired
- indicates whether it requires to be the owner of this pathwriteRequired
- indicates whether it requires to have write permissionsAccessControlException
- if permission checking failsInvalidPathException
- if the path is invalidCopyright © 2023. All Rights Reserved.