IPWorks Cloud 2020 Python Edition

Questions / Feedback?

list_permissions Method

Lists the permissions for a file, folder, or shared drive.

Syntax

def list_permissions(resource_id: str) -> None: ...

Remarks

This method is used to list permissions for the file, folder, or shared drive specified by ResourceId.

Calling this method will fire the on_permission_list event once for each permission, and will also populate the Permission* properties.

If there are still more permissions available to list when this method returns, the permission_marker property will be populated. Continue to call this method until permission_marker is empty to accumulate all pages of results in the Permission* properties.

// PermissionList event handler.
googledrive.OnPermissionList += (s, e) => {
  Console.WriteLine("Permission Id: " + e.Id);
};

// List all of the permissions on the given resource.
do {
  googledrive.ListPermissions("fdjhskdf89o3wi");

  for (int i = 0; i < googledrive.Permissions.Count; i++) {
    // Process permissions here.
  }
} while (!string.IsNullOrEmpty(googledrive.PermissionMarker));

Shared Drive Members

Refer to update_permissions for more information about how permissions work in general, how permissions relate to shared drive members, and how to manipulate multiple members at once.

Shared Drive Capabilities

To determine the effective capabilities the current user has for shared drives that they're a member of, call list_shared_drives instead and inspect the shared_drive_capabilities property of the returned items.

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