PowerPoint.LabelingCapability enum

Notes

Cet API est fourni en tant qu’aperçu pour les développeurs et peut être modifié en fonction des commentaires que nous avons reçus. N’utilisez pas cet API dans un environnement de production.

Indique la fonctionnalité d’étiquetage.

Remarques

Jeu d’API : PowerPointApi BETA (PRÉVERSION UNIQUEMENT)

Utilisateur

Exemples

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

Champs

attributeBasedAccessControlEnabled = "AttributeBasedAccessControlEnabled"

Représente le contrôle d’accès basé sur les attributs (ABAC) pris en charge par l’hôte. Lorsqu’il est renvoyé avec labelingEnabled, un complément peut utiliser des API spécifiques à ABAC, telles que SensitivityLabelsCatalog.getAttributes.

labelingDisabled = "LabelingDisabled"

Représente la désactivation de l’étiquetage.

labelingEnabled = "LabelingEnabled"

Représente l’étiquetage en cours d’activation.

labelingPolicyNotFound = "LabelingPolicyNotFound"

Représente une stratégie d’étiquetage introuvable.

noLicense = "NoLicense"

Indique qu’il n’y a pas de licences valides.