PowerPoint.LabelingCapability enum

注意

この API は開発者向けにプレビューとして提供されており、寄せられたフィードバックにもとづいて変更される場合があります。 この API は運用環境で使用しないでください。

ラベル付け機能を示します。

注釈

API セット: PowerPointApi ベータ版 (プレビューのみ)

使用元

例

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/preview-apis/manage-sensitivity-labels.yaml

await PowerPoint.run(async (context) => {
  // Check whether sensitivity labeling is available for the current user.
  const labelCatalog: PowerPoint.SensitivityLabelsCatalog = context.sensitivityLabelsCatalog;
  if (!labelCatalog) {
    console.warn("The sensitivity label catalog isn't available.");
    return;
  }

  labelCatalog.load("getLabelingCapability");
  await context.sync();

  switch (labelCatalog.getLabelingCapability) {
    case PowerPoint.LabelingCapability.labelingEnabled:
      console.log("Sensitivity labeling is enabled.");
      break;
    case PowerPoint.LabelingCapability.labelingDisabled:
      console.log("Sensitivity labeling is disabled.");
      break;
    case PowerPoint.LabelingCapability.labelingPolicyNotFound:
      console.log("No sensitivity labeling policy was found.");
      break;
    case PowerPoint.LabelingCapability.noLicense:
      console.log("The current user doesn't have a valid sensitivity labeling license.");
      break;
    default:
      console.log(`Unknown labeling capability: ${labelCatalog.getLabelingCapability}`);
      break;
  }
});

フィールド

attributeBasedAccessControlEnabled = "AttributeBasedAccessControlEnabled"

ホストでサポートされている属性ベースのアクセス制御 (ABAC) を表します。 labelingEnabled と共に返されるアドインは、SensitivityLabelsCatalog.getAttributes などの ABAC 固有の API を使用できます。

labelingDisabled = "LabelingDisabled"

ラベル付けが無効になっていることを表します。

labelingEnabled = "LabelingEnabled"

ラベル付けが有効になっていることを表します。

labelingPolicyNotFound = "LabelingPolicyNotFound"

ラベル付けポリシーが見つからないことを表します。

noLicense = "NoLicense"

有効なライセンスがないことを表します。