Skip to main content

TdxCloudStorage.InviteUsers(TdxCloudStorageItem,TArray<string>,Boolean,Boolean,Boolean,string) Method

Adds one or more permissions to view or edit a file or folder for all specified users.

Declaration

function InviteUsers(AItem: TdxCloudStorageItem; const AUsers: TArray<string>; AReadOnly: Boolean = True; ARequireSignIn: Boolean = False; ASendInvitation: Boolean = False; const AMessage: string = ''): TList<TdxCloudStorageItemPermission>;

Parameters

Name Type Description
AItem TdxCloudStorageItem

A cloud file or folder metadata container.

AUsers TArray<T>

An array of user emails for which the function generates access permissions.

AReadOnly Boolean

If True, the function generates read-only access permissions for the specified users; otherwise, the users can edit the cloud resource.

ARequireSignIn Boolean

If True, the specified users need to sign in to a Microsoft OneDrive® or SharePoint® storage account to access the cloud resource; otherwise, the generated access permissions allow anonymous access. This parameter value affects only Microsoft services.

ASendInvitation Boolean

If True, the cloud storage sends invitations to all specified users; otherwise, users receive no notifications.

AMessage string

A custom message sent in invitation emails. This parameter has no effect if the ASendInvitation parameter value is False.

Returns

Type Description
TList<T>

A list of generated access permissions.

Remarks

Call this procedure to create a series of read-only access permissions for the specified users. You can pass False as the optional AReadOnly parameter to create a series of permissions to edit the cloud resource instead.

Note

The InviteUsers function always runs in the same thread from which it is called. Alternatively, you can call the asynchronous Permissions.InviteUsers procedure of a cloud storage item to load its access permissions. The OnItemPermissionCreated event occurs every time the InviteUsers procedure creates a permission. This event can occur multiple times per single InviteUsers procedure call, and once per user specified in the AUsers array.

See Also