IPWorks Cloud 2020 ActiveX Edition

Questions / Feedback?

ListPermissions Method

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

Syntax

googledrivecontrol.ListPermissions ResourceId

Remarks

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

Calling this method will fire the PermissionList 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 PermissionMarker property will be populated. Continue to call this method until PermissionMarker 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 UpdatePermissions 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 ListSharedDrives instead and inspect the SharedDriveCapabilities property of the returned items.

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