GData.AccessRule

g GData.AccessRule GData.AccessRule GData.Entry GData.Entry GData.Entry->GData.AccessRule GData.Parsable GData.Parsable GData.Parsable->GData.Entry GObject.Object GObject.Object GObject.Object->GData.Parsable

Subclasses:

GData.CalendarAccessRule, GData.DocumentsAccessRule

Methods

Inherited:

GData.Entry (24), GData.Parsable (5), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (id)

get_edited ()

get_key ()

get_role ()

get_scope ()

set_role (role)

set_scope (type, value)

Virtual Methods

Inherited:

GData.Parsable (9), GObject.Object (7)

Properties

Inherited:

GData.Entry (10), GData.Parsable (1)

Name

Type

Flags

Short Description

edited

int

r

The last time the access rule was edited.

key

str

r

An optional authorisation key required to access this item.

role

str

r/w

The role of the person concerned by this ACL.

scope-type

str

r/w

Specifies to whom this access rule applies.

scope-value

str

r/w

The scope value for this access rule.

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GData.Entry

r

Class Details

class GData.AccessRule(**kwargs)
Bases:

GData.Entry

Abstract:

No

Structure:

GData.AccessRuleClass

All the fields in the GData.AccessRule structure are private and should never be accessed directly.

New in version 0.3.0.

classmethod new(id)
Parameters:

id (str) – the access rule’s ID, or None

Returns:

a new GData.AccessRule; unref with GObject.Object.unref()

Return type:

GData.AccessRule

Creates a new GData.AccessRule with the given ID and default properties.

New in version 0.3.0.

get_edited()
Returns:

the UNIX timestamp for the time the access rule was last edited, or -1

Return type:

int

Gets the GData.AccessRule :edited property. If the property is unset, -1 will be returned.

New in version 0.7.0.

get_key()
Returns:

the access rule’s authorisation key, or None

Return type:

str

Gets the GData.AccessRule :key property.

New in version 0.16.0.

get_role()
Returns:

the access rule’s role, or None

Return type:

str

Gets the GData.AccessRule :role property.

New in version 0.3.0.

get_scope()
Returns:

type:

return location for the scope type, or None

value:

return location for the scope value, or None

Return type:

(type: str, value: str)

Gets the GData.AccessRule :scope-type and GData.AccessRule :scope-value properties.

New in version 0.3.0.

set_role(role)
Parameters:

role (str) – a new role, or None

Sets the GData.AccessRule :role property to role. role must be a non-empty string, such as GData.ACCESS_ROLE_NONE.

Set role to None to unset the property in the access rule.

New in version 0.3.0.

set_scope(type, value)
Parameters:
  • type (str) – a new scope type

  • value (str or None) – a new scope value, or None

Sets the GData.AccessRule :scope-type property to type and the GData.AccessRule :scope-value property to value.

Set scope_value to None to unset the GData.AccessRule :scope-value property in the access rule. type cannot be None. scope_value must be None if type is default, and non-None otherwise.

See the

online documentation for more information.

New in version 0.3.0.

Property Details

GData.AccessRule.props.edited
Name:

edited

Type:

int

Default Value:

-1

Flags:

READABLE

The last time the access rule was edited. If the rule has not been edited yet, the content indicates the time it was created.

For more information, see the Atom Publishing Protocol specification.

New in version 0.7.0.

GData.AccessRule.props.key
Name:

key

Type:

str

Default Value:

None

Flags:

READABLE

An optional authorisation key required to access this item with the given scope. If set, this restricts access to those principals who have a copy of the key. The key is generated server-side and cannot be modified by the client. If no authorisation key is set (and hence none is needed for access to the item), this will be None.

New in version 0.16.0.

GData.AccessRule.props.role
Name:

role

Type:

str

Default Value:

'none'

Flags:

READABLE, WRITABLE

The role of the person concerned by this ACL. By default, this can only be GData.ACCESS_ROLE_NONE. Services may extend it with their own namespaced roles.

New in version 0.3.0.

GData.AccessRule.props.scope_type
Name:

scope-type

Type:

str

Default Value:

'default'

Flags:

READABLE, WRITABLE

Specifies to whom this access rule applies. For example, GData.ACCESS_SCOPE_USER or GData.ACCESS_SCOPE_DEFAULT.

New in version 0.3.0.

GData.AccessRule.props.scope_value
Name:

scope-value

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

A value representing the user who is represented by the access rule, such as an e-mail address for users, or a domain name for domains.

This must be None if and only if GData.AccessRule :scope-type is GData.ACCESS_SCOPE_DEFAULT.

New in version 0.3.0.