Infinity.AclSheet

Fields

Name

Type

Access

Description

account

int

r/w

The account for which to apply the permissions in this sheet.

mask

Infinity.AclMask

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

Infinity.AclMask

r/w

Mask which specifies whether or not the user is allowed to perform the various operations defined by Infinity.AclSetting.

Methods

class

new (account)

class

perms_from_xml (xml)

class

perms_to_xml (mask, perms, xml)

copy ()

free ()

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 with Infinity.AclSheet.free() when no longer in use.

Return type:

Infinity.AclSheet

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:

GLib.Error

Returns:

True if the operation was successful, or False 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 returns False and error is set.

classmethod perms_to_xml(mask, perms, xml)
Parameters:

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:

Infinity.AclSheet

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 by Infinity.AclSheet.copy().