PermissionList Event
This event fires once for each permission returned when listing permissions.
Syntax
public event OnPermissionListHandler OnPermissionList; public delegate void OnPermissionListHandler(object sender, GoogledrivePermissionListEventArgs e); public class GoogledrivePermissionListEventArgs : EventArgs { public string Id { get; } public int Role { get; } public int PermissionType { get; } public string Email { get; } public string Domain { get; } public bool AllowFileDiscovery { get; } }
Public Event OnPermissionList As OnPermissionListHandler Public Delegate Sub OnPermissionListHandler(sender As Object, e As GoogledrivePermissionListEventArgs) Public Class GoogledrivePermissionListEventArgs Inherits EventArgs Public ReadOnly Property Id As String Public ReadOnly Property Role As Integer Public ReadOnly Property PermissionType As Integer Public ReadOnly Property Email As String Public ReadOnly Property Domain As String Public ReadOnly Property AllowFileDiscovery As Boolean End Class
Remarks
When calling ListPermissions this event will fire once for each permission that is returned.
Id is the Id of the permission.
Role is the role of the permission. Possible values are:
prReader (0) | 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). |
PermissionType indicates the type of the permission. Possible values are:
0 (ptUser) | A single user. |
1 (ptGroup) | A group. |
2 (ptDomain) | A domain. |
3 (ptAnyone) | Anyone, authenticated or not. |
Email holds the email address of the user or group that the permission applies to when Type is 0 or 1.
Domain holds the domain that the permission applies to when Type is 2.
AllowFileDiscovery signifies whether the permission allows the file to be discovered through search. It is only applicable when Type is 2 or 3.