Office.MailboxEnums.DelegatePermissions enum
このビットマスクは、共有フォルダーに対するデリゲートのアクセス許可を表します。
注釈
適用できる Outlook モード: 新規作成または読み取り
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/65-delegates-and-shared-folders/get-shared-properties.yaml
if (!Office.context.mailbox.item.getSharedPropertiesAsync) {
console.error("Try this sample on an appointment from a shared folder.");
return;
}
Office.context.mailbox.getCallbackTokenAsync({ isRest: true }, function(result) {
if (result.status === Office.AsyncResultStatus.Succeeded && result.value !== "") {
Office.context.mailbox.item.getSharedPropertiesAsync(
{
// Pass auth token along.
asyncContext: result.value
},
function(result2) {
let sharedProperties = result2.value;
let delegatePermissions = sharedProperties.delegatePermissions;
// Determine if user has the appropriate permission to do the operation.
if ((delegatePermissions & Office.MailboxEnums.DelegatePermissions.Read) != 0) {
const ewsId = Office.context.mailbox.item.itemId;
const restId = Office.context.mailbox.convertToRestId(ewsId, Office.MailboxEnums.RestVersion.v2_0);
let rest_url =
sharedProperties.targetRestUrl + "/v2.0/users/" + sharedProperties.targetMailbox + "/events/" + restId;
$.ajax({
url: rest_url,
dataType: "json",
headers: { Authorization: "Bearer " + result2.asyncContext }
})
.done(function(response) {
console.log(response);
})
.fail(function(error) {
console.error(error);
});
}
}
);
}
});
フィールド
Read = 1 | デリゲートには、アイテムを読み取るアクセス許可があります。 |
Write = 2 | デリゲートには、アイテムを作成および書き込むアクセス許可があります。 |
DeleteOwn = 4 | デリゲートには、作成したアイテムのみを削除するアクセス許可があります。 |
DeleteAll = 8 | デリゲートには、項目を削除するアクセス許可があります。 |
EditOwn = 16 | デリゲートには、自分が作成したアイテムのみを編集するアクセス許可があります。 |
EditAll = 32 | デリゲートには、アイテムを編集するためのアクセス許可があります。 |
GitHub で Microsoft と共同作業する
このコンテンツのソースは GitHub にあります。そこで、issue や pull request を作成および確認することもできます。 詳細については、共同作成者ガイドを参照してください。
Office Add-ins