PowerPoint.LabelingCapability enum

Observação

Esta API é fornecida como uma versão prévia para desenvolvedores e pode ser alterada com base nos comentários que recebemos. Não use esta API em um ambiente de produção.

Indica a funcionalidade de rotulagem.

Comentários

Conjunto de APIs: PowerPointApi BETA (SOMENTE VISUALIZAÇÃO)

Usada por

Exemplos

// 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;
  }
});

Campos

attributeBasedAccessControlEnabled = "AttributeBasedAccessControlEnabled"

Representa o ABAC (controle de acesso baseado em atributos) sendo suportado pelo host. Quando retornado com labelingEnabled, um suplemento pode usar APIs específicas do ABAC, como SensitivityLabelsCatalog.getAttributes.

labelingDisabled = "LabelingDisabled"

Representa a desativação da rotulagem.

labelingEnabled = "LabelingEnabled"

Representa a habilitação da rotulagem.

labelingPolicyNotFound = "LabelingPolicyNotFound"

Representa uma política de rotulagem não encontrada.

noLicense = "NoLicense"

Afirma que não há licenças válidas.