Skip to content

Gio.SimplePermission

class — extends Permission

GSimplePermission is a trivial implementation of Permission that represents a permission that is either always or never allowed. The value is given at construction and doesn’t change.

Calling Permission.acquire or Permission.release on a GSimplePermission will result in errors.

Constructors

new

@classmethod
def new(cls, allowed: bool) -> Permission

Creates a new Permission instance that represents an action that is either always or never allowed.

Parameters:

  • allowedTrue if the action is allowed