Permissions

An inline card that asks the user to approve or deny a proposed agent action from inside the Composer.

Installation

import { Permissions } from "@o/pipeline/experimental/components/composer/permissions";

Usage

Permission needed for creating a next step on DEAL-142

Re-engage Steve Jobs — follow up on radio silence

4 Dec

Permission needed for commenting on DEAL-142

It went well.

Permissions resolves nothing itself. There is no entity-to-icon lookup and no date formatting. Permissions.ItemIcon takes whichever icon names the proposed action (IconNextSteps, IconComment, …), and Permissions.ItemMetaContent takes an already-formatted date string; the caller decides both. Permissions.ItemMeta is optional per item: omit it entirely for actions with no due date, such as a proposed comment.

Permissions.ItemIcon and Permissions.ItemMetaIcon both render a Glyph, so an icon in either slot gets the same size and colour.

Composition

Permissions.Root
├── Permissions.Header
│   ├── Permissions.Title
│   └── Permissions.Dismiss
├── Permissions.Item
│   ├── Permissions.ItemIcon
│   ├── Permissions.ItemContent
│   └── Permissions.ItemMeta
│       ├── Permissions.ItemMetaContent
│       └── Permissions.ItemMetaIcon
└── Permissions.Footer
    └── Permissions.Actions
        ├── Permissions.Action
        ├── Permissions.Deny
        ├── Permissions.AllowAlways
        └── Permissions.Allow

Inside Composer