IPWorks Cloud 2020 Node.js Edition

Questions / Feedback?

PermissionRole Property

The role specified by the permission.

Syntax

 googledrive.getPermissionRole(index, [callback])
 googledrive.setPermissionRole(index,  permissionRole, [callback])

Possible Values

  0 (prReader), 
  1 (prCommenter), 
  2 (prWriter), 
  3 (prOwner), 
  4 (prFileOrganizer), 
  5 (prOrganizer)

Default Value

0

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getPermissionRole([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setPermissionRole([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

The role specified by the permission.

This property defines the role specified by the permission. Possible values are:

prReader (0) (default) 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).

The index parameter specifies the index of the item in the array. The size of the array is controlled by the PermissionCount property.

This property is not available at design time.

Data Type

Integer

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