Office.MailboxEnums.DelegatePermissions enum

此位掩码表示委托对共享文件夹的权限。

注解

[ API set: Mailbox 1.8 ]

适用的 Outlook 模式:Compose或读取

示例

Office.context.mailbox.item.getSharedPropertiesAsync((result) => {
    if (result.status === Office.AsyncResultStatus.Failed) {
        console.error("The current folder or mailbox isn't shared.");
        return;
    }

    const delegatePermissions = result.value.delegatePermissions;

    // Check if the user has write permissions to the shared resource.
    if ((delegatePermissions & Office.MailboxEnums.DelegatePermissions.Write) != 0) {
        console.log("User has write permissions to the shared resource.");
        // Perform the necessary operations.
    }
});

字段

Read = 1

委托具有读取项的权限。

Write = 2

委托有权创建和写入项。

DeleteOwn = 4

委托仅有权删除他们创建的项。

DeleteAll = 8

委托有权删除任何项目。

EditOwn = 16

委托仅有权编辑他们创建的项。

EditAll = 32

委托有权编辑任何项目。