IPWorks Cloud 2020 Python Edition

Questions / Feedback?

on_permission_list Event

This event fires once for each permission returned when listing permissions.

Syntax

class GoogleDrivePermissionListEventParams(object):
  @property
  def id() -> str: ...
  @property
  def role() -> int: ...
  @property
  def permission_type() -> int: ...
  @property
  def email() -> str: ...
  @property
  def domain() -> str: ...
  @property
  def allow_file_discovery() -> bool: ...

# In class GoogleDrive:
@property
def on_permission_list() -> Callable[[GoogleDrivePermissionListEventParams], None]: ...
@on_permission_list.setter
def on_permission_list(event_hook: Callable[[GoogleDrivePermissionListEventParams], None]) -> None: ...

Remarks

When calling list_permissions this event will fire once for each permission that is returned.

Id is the Id of the permission.

Role is the role of the permission. Possible values are:

prReader (0) Read-only permissions.
prCommenter (1) Read-only plus commenting permissions.
prWriter (2) Read, write, and comment permissions.
prOwner (3) Full ownership (personal drives only).
prFileOrganizer (4) Writer permissions, plus the ability to move and trash resources (shared drives only).
prOrganizer (5) File organizer permissions, plus the ability to permanently delete resources from, and rename/delete/alter the membership of, a shared drive (shared drives only).

PermissionType indicates the type of the permission. Possible values are:

0 (ptUser) A single user.
1 (ptGroup) A group.
2 (ptDomain) A domain.
3 (ptAnyone) Anyone, authenticated or not.

Email holds the email address of the user or group that the permission applies to when Type is 0 or 1.

Domain holds the domain that the permission applies to when Type is 2.

AllowFileDiscovery signifies whether the permission allows the file to be discovered through search. It is only applicable when Type is 2 or 3.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Python Edition - Version 20.0 [Build 8265]