kibana/x-pack/plugins/saved_objects_tagging
Pierre Gayvallet 93c46f5dfc
Remove tag name validation (#88800)
* Remove tag name validation

* remove i18n key

* add FTR test on searching for tag with special chars in name
2021-01-25 15:29:10 +01:00
..
common Remove tag name validation (#88800) 2021-01-25 15:29:10 +01:00
public [SO Tagging] Update tag delete modal confirmation title (#85997) 2020-12-15 21:41:47 +01:00
server [Core] Explicit typings for request handler context (#88718) 2021-01-21 15:20:22 +01:00
jest.config.js Jest multi-project configuration (#77894) 2020-12-02 11:42:23 -08:00
kibana.json Add bulk assign action to tag management (#84177) 2020-12-07 11:18:43 +01:00
README.md Add bulk assign action to tag management (#84177) 2020-12-07 11:18:43 +01:00
tsconfig.json [DX] migrate core xpack plugins to tsproject ref (#88676) 2021-01-20 16:40:13 +01:00

SavedObjectsTagging

Add tagging capability to saved objects

Integrating tagging on a new object type

In addition to use the UI api to plug the tagging feature in your application, there is a couple things that needs to be done on the server:

Add read-access to the tag SO type to your feature's capabilities

In order to be able to fetch the tags assigned to an object, the user must have read permission for the tag saved object type. Which is why all features relying on SO tagging must update their capabilities.

features.registerKibanaFeature({
  id: 'myFeature',
  // ...
  privileges: {
    all: {
      // ...
      savedObject: {
        all: ['some-type'],
        read: ['tag'], // <-- HERE
      },
    },
    read: {
      // ...
      savedObject: {
        all: [],
        read: ['some-type', 'tag'], // <-- AND HERE
      },
    },
  },
});

Update the SOT telemetry collector schema to add the new type

The schema is located here: x-pack/plugins/saved_objects_tagging/server/usage/schema.ts. You just need to add the name of the SO type you are adding.

export const tagUsageCollectorSchema: MakeSchemaFrom<TaggingUsageData> = {
  // ...
  types: {
    dashboard: perTypeSchema,
    visualization: perTypeSchema,
    // <-- add your type here
  },
};

Update the taggableTypes constant to add your type

Edit the taggableTypes list in x-pack/plugins/saved_objects_tagging/common/constants.ts to add the name of the type you are adding.