Infinity.AclSheet¶
Fields¶
Name |
Type |
Access |
Description |
---|---|---|---|
account |
r/w |
The account for which to apply the permissions in this sheet. |
|
mask |
r/w |
Mask which specifies which of the permissions in the perms field take effect. Fields which are masked-out are left at their default value and inherited from the parent node. |
|
perms |
r/w |
Mask which specifies whether or not the user is allowed to perform the various operations defined by |
Methods¶
class |
|
class |
|
class |
|
|
|
|
Details¶
- class Infinity.AclSheet¶
A set of permissions to be applied for a particular account and a particular node in the infinote directory.
- classmethod new(account)¶
- Parameters:
account (
int
) – The #InfAclAccountId representing a unique account id.- Returns:
A new
Infinity.AclSheet
. Free withInfinity.AclSheet.free
() when no longer in use.- Return type:
Creates a dynamically allocated
Infinity.AclSheet
. This is usually not needed because you can copy the structs by value, but it is useful for properties and bindings. The new sheet will hold permissions for the given account. The permissions will initially be all masked out.
- classmethod perms_from_xml(xml)¶
- Parameters:
xml (
libxml2.NodePtr
) – The XML node to read from.- Raises:
- Returns:
True
if the operation was successful, orFalse
on error.- mask:
Output parameter to write the permission mask to.
- perms:
Output parameter to write the permissions to.
- Return type:
(
bool
, mask:Infinity.AclMask
, perms:Infinity.AclMask
)
This function extracts the permission mask and the permission flags from the XML node xml. The counterpart to this function is
Infinity.AclSheet.perms_to_xml
(). If an error occurs the function returnsFalse
and error is set.
- classmethod perms_to_xml(mask, perms, xml)¶
- Parameters:
mask (
Infinity.AclMask
) – Permission mask to write.perms (
Infinity.AclMask
) – Individiual permissions to write.xml (
libxml2.NodePtr
) – error: Location to store error information, if any.
This function writes the given permission mask and permission flags to the XML node xml. They can be converted back using the
Infinity.AclSheet.perms_from_xml
() function.
- copy()¶
- Returns:
A newly-allocated copy of self. Free with
Infinity.AclSheet.free
() when no longer in use.- Return type:
Makes a dynamically allocated copy of self. This should not be used by applications because you can copy the structs by value, but it is useful for properties and bindings.
- free()¶
Frees a
Infinity.AclSheet
allocated byInfinity.AclSheet.copy
().