Resource: Permission
A permission for a file. A permission grants a user, group, domain, or the world access to a file or a folder hierarchy.
Some resource methods (such as permissions.update
) require a permissionId
. Use the permissions.list
method to retrieve the ID for a file, folder, or shared drive.
JSON representation |
---|
{ "id": string, "displayName": string, "type": string, "kind": string, "permissionDetails": [ { "permissionType": string, "inheritedFrom": string, "role": string, "inherited": boolean } ], "photoLink": string, "emailAddress": string, "role": string, "allowFileDiscovery": boolean, "domain": string, "expirationTime": string, "teamDrivePermissionDetails": [ { "teamDrivePermissionType": string, "inheritedFrom": string, "role": string, "inherited": boolean } ], "deleted": boolean, "view": string, "pendingOwner": boolean } |
Fields | |
---|---|
id |
Output only. The ID of this permission. This is a unique identifier for the grantee, and is published in User resources as |
displayName |
Output only. The "pretty" name of the value of the permission. The following is a list of examples for each type of permission:
|
type |
The type of the grantee. Valid values are:
When creating a permission, if |
kind |
Output only. Identifies what kind of resource this is. Value: the fixed string |
permissionDetails[] |
Output only. Details of whether the permissions on this shared drive item are inherited or directly on this item. This is an output-only field which is present only for shared drive items. |
permissionDetails[].permissionType |
Output only. The permission type for this user. While new values may be added in future, the following are currently possible:
|
permissionDetails[].inheritedFrom |
Output only. The ID of the item from which this permission is inherited. This is an output-only field. |
permissionDetails[].role |
Output only. The primary role for this user. While new values may be added in the future, the following are currently possible:
|
permissionDetails[].inherited |
Output only. Whether this permission is inherited. This field is always populated. This is an output-only field. |
photoLink |
Output only. A link to the user's profile photo, if available. |
emailAddress |
The email address of the user or group to which this permission refers. |
role |
The role granted by this permission. While new values may be supported in the future, the following are currently allowed:
|
allowFileDiscovery |
Whether the permission allows the file to be discovered through search. This is only applicable for permissions of type |
domain |
The domain to which this permission refers. |
expirationTime |
The time at which this permission will expire (RFC 3339 date-time). Expiration times have the following restrictions:
|
teamDrivePermissionDetails[] |
Output only. Deprecated: Output only. Use |
teamDrivePermissionDetails[] |
Deprecated: Output only. Use |
teamDrivePermissionDetails[] |
Deprecated: Output only. Use |
teamDrivePermissionDetails[] |
Deprecated: Output only. Use |
teamDrivePermissionDetails[] |
Deprecated: Output only. Use |
deleted |
Output only. Whether the account associated with this permission has been deleted. This field only pertains to user and group permissions. |
view |
Indicates the view for this permission. Only populated for permissions that belong to a view. 'published' is the only supported value. |
pendingOwner |
Whether the account associated with this permission is a pending owner. Only populated for |
Methods |
|
---|---|
|
Creates a permission for a file or shared drive. |
|
Deletes a permission. |
|
Gets a permission by ID. |
|
Lists a file's or shared drive's permissions. |
|
Updates a permission with patch semantics. |