KACL Class Reference
from PyKDE4.kio import *
Detailed Description
The KACL class encapsulates a POSIX Access Control List. It follows the
little standard that couldn't, 1003.1e/1003.2c, which died in draft status.
a POSIX ACL encapsulation
- Author:
- Till Adam <adam@kde.org>
Methods |
| __init__ (self, QString aclString) |
| __init__ (self, KACL rhs) |
| __init__ (self, mode_t basicPermissions) |
| __init__ (self) |
ACLGroupPermissionsList | allGroupPermissions (self) |
ACLUserPermissionsList | allUserPermissions (self) |
QString | asString (self) |
mode_t | basePermissions (self) |
bool | isExtended (self) |
bool | isValid (self) |
long, bool (exists) | maskPermissions (self, ) |
long, bool (exists) | namedGroupPermissions (self, QString name, ) |
long, bool (exists) | namedUserPermissions (self, QString name, ) |
bool | operator != (self, KACL rhs) |
bool | operator == (self, KACL rhs) |
long | othersPermissions (self) |
long | ownerPermissions (self) |
long | owningGroupPermissions (self) |
bool | setACL (self, QString aclStr) |
bool | setAllGroupPermissions (self, ACLGroupPermissionsList a0) |
bool | setAllUserPermissions (self, ACLUserPermissionsList list) |
bool | setMaskPermissions (self, long a0) |
bool | setNamedGroupPermissions (self, QString name, long a0) |
bool | setNamedUserPermissions (self, QString name, long a0) |
bool | setOthersPermissions (self, long a0) |
bool | setOwnerPermissions (self, long a0) |
bool | setOwningGroupPermissions (self, long a0) |
| virtual_hook (self, int id, void data) |
Method Documentation
__init__ |
( |
self, |
|
|
|
QString |
aclString |
|
) |
|
|
|
Creates a new KACL from aclString. If the string is a valid acl
string, isValid() will afterwards return true.
__init__ |
( |
self, |
|
|
|
KACL |
rhs |
|
) |
|
|
|
__init__ |
( |
self, |
|
|
|
mode_t |
basicPermissions |
|
) |
|
|
|
Creates a new KACL from the basic permissions passed in basicPermissions.
isValid() will return true, afterwards.
Creates an empty KACL. Until a valid acl string is set via setACL,
isValid() will return false.
ACLGroupPermissionsList allGroupPermissions |
( |
|
self ) |
|
Returns the list of all group permission entries. Each entry consists
of a name/permissions pair. This is a QPair, therefor access is provided
via the .first and .next members.
- Returns:
- the list of all group permission entries.
ACLUserPermissionsList allUserPermissions |
( |
|
self ) |
|
Returns the list of all group permission entries. Each entry consists
of a name/permissions pair. This is a QPair, therefore access is provided
via the .first and .next members.
- Returns:
- the list of all group permission entries.
Return a string representation of the ACL.
- Returns:
- a string version of the ACL in the format compatible with libacl and
POSIX 1003.1e. Implementations conforming to that standard should be able
to take such strings as input.
mode_t basePermissions |
( |
|
self ) |
|
- Returns:
- the basic (owner/group/others) part of the ACL as a mode_t
Return whether the ACL contains extended entries or can be expressed
using only basic file permissions.
- Returns:
- whether the ACL contains extended entries
Returns whether the KACL object represents a valid acl.
- Returns:
- whether the KACL object represents a valid acl.
long, bool (exists) maskPermissions |
( |
self, |
|
|
) |
|
|
|
Return the entry for the permissions mask if there is one and sets
exists to true. If there is no such entry, exists is set to false.
- Returns:
- the permissions mask entry
long, bool (exists) namedGroupPermissions |
( |
self, |
|
|
|
QString |
name, |
|
) |
|
|
|
Access to the permissions entry for a named group, if such an entry
exists. If exists is non-null, the boolean variable it points to is
set to true if a matching entry exists and to false otherwise.
- Returns:
- the permissions for a group with the name in name
long, bool (exists) namedUserPermissions |
( |
self, |
|
|
|
QString |
name, |
|
) |
|
|
|
Access to the permissions entry for a named user, if such an entry
exists. If exists is non-null, the boolean variable it points to
is set to true if a matching entry exists and to false otherwise.
- Returns:
- the permissions for a user entry with the name in name
bool operator != |
( |
self, |
|
|
|
KACL |
rhs |
|
) |
|
|
|
bool operator == |
( |
self, |
|
|
|
KACL |
rhs |
|
) |
|
|
|
long othersPermissions |
( |
|
self ) |
|
- Returns:
- the premissions entry for others
long ownerPermissions |
( |
|
self ) |
|
- Returns:
- the owner's premissions entry
long owningGroupPermissions |
( |
|
self ) |
|
- Returns:
- the owning group's premissions entry
bool setACL |
( |
self, |
|
|
|
QString |
aclStr |
|
) |
|
|
|
Sets the whole list from a string. If the string in aclStr represents
a valid ACL, it will be set, otherwise the ACL remains unchanged.
- Returns:
- whether setting the ACL was successful.
bool setAllGroupPermissions |
( |
self, |
|
|
|
ACLGroupPermissionsList |
a0 |
|
) |
|
|
|
Replace the list of all user permissions with list. If one
of the entries in the list does not exists, or setting of the ACL
entry fails for any reason, the ACL will be left unchanged.
- Returns:
- success or failure
bool setAllUserPermissions |
( |
self, |
|
|
|
ACLUserPermissionsList |
list |
|
) |
|
|
|
Replace the list of all user permissions with list. If one
of the entries in the list does not exists, or setting of the ACL
entry fails for any reason, the ACL will be left unchanged.
- Returns:
- success or failure
bool setMaskPermissions |
( |
self, |
|
|
|
long |
a0 |
|
) |
|
|
|
Set the permissions mask for the ACL. Permissions set for individual
entries will be masked with this, such that their effective permissions
are the result of the logical and of their entry and the mask.
- Returns:
- success or failure
bool setNamedGroupPermissions |
( |
self, |
|
|
|
QString |
name, |
|
|
long |
a0 |
|
) |
|
|
|
Set the permissions for a group with the name name. Will fail
if the group doesn't exist, in which case the ACL be unchanged.
- Returns:
- success or failure.
bool setNamedUserPermissions |
( |
self, |
|
|
|
QString |
name, |
|
|
long |
a0 |
|
) |
|
|
|
Set the permissions for a user with the name name. Will fail
if the user doesn't exist, in which case the ACL will be unchanged.
- Returns:
- success or failure.
bool setOthersPermissions |
( |
self, |
|
|
|
long |
a0 |
|
) |
|
|
|
Set the permissions entry for others.
- Returns:
- success or failure
bool setOwnerPermissions |
( |
self, |
|
|
|
long |
a0 |
|
) |
|
|
|
Set the owner's permissions entry.
- Returns:
- success or failure
bool setOwningGroupPermissions |
( |
self, |
|
|
|
long |
a0 |
|
) |
|
|
|
Set the owning group's permissions entry.
- Returns:
- success or failure
virtual_hook |
( |
self, |
|
|
|
int |
id, |
|
|
void |
data |
|
) |
|
|
|