IPWorks Cloud 2020 Kotlin Edition

Questions / Feedback?

RemoveSharedDriveMember Method

Removes an existing shared drive member.

Syntax

public fun removeSharedDriveMember(sharedDriveId: String?, permissionId: String?)

Remarks

This is a convenience method that removes an existing member of a shared drive (specified by SharedDriveId) by deleting their associated permission (specified by PermissionId).

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.

string sharedDriveId = "20983euijdsds";
// First, we'll add a new member to the shared drive. The two integer parameters signify:
// * The role type. 2 is the "Writer" role, which provides read and write (but not organize) permissions.
// * The permission type. 0 means this is a single user (versus a group).
// The Id of the new permission we've created on the shared drive--which is what actually causes the user to
// be a member of the shared drive--is returned.
string permId = googledrive.AddSharedDriveMember(sharedDriveId, 2, 0, "fakeuser@example.com");

// At some point later, perhaps this user has abused their privileges and we wish to revoke their writer
// permissions. We change their role to "Commenter", which provides reader and commenting permissions.
googledrive.UpdateSharedDriveMember(sharedDriveId, permId, 1); // 1 is the "Commenter" role.

// Or perhaps we wish to simply remove the user's shared drive membership completely.
googledrive.RemoveSharedDriveMember(sharedDriveId, permId);

Copyright (c) 2021 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Kotlin Edition - Version 20.0 [Build 7941]