Skip to content

feat(platform): grant a competence to a team #5190

Closed

Description

@tale-code-bot

Part of #5047 (part c).

What the code does today

Observed at feature-train c0eb93b6b2eadf7744eaf0a666e55efb6d27c41f.

  • Each grant names one member: app.competence_records.user_id is NOT NULL (services/platform/backend/db/migrations/0057_competence_records.sql).
  • These read the register by member:
    • holdsCapability (services/platform/backend/domains/governance/competence.ts);
    • mayCreateApiKeys and mayConnectAgentIn (services/platform/backend/auth/api-key-create-gate.ts), which query app.competence_records directly by user_id;
    • removeMembershipCascade (services/platform/backend/auth/membership.ts), which revokes a member's grants when the member leaves.
  • Team membership is changed by org admins and by identity-provider sync. services/platform/backend/domains/teams/routes.ts says adding and removing members needs an org admin. Memberships can also come from an identity provider, which records where each one came from.

What is asked

  • A grant can name a team instead of a member. The team's current and future members hold the right while they are in the team, and leaving the team ends it.
  • The schema of app.competence_records can hold a team grant.
  • holdsCapability, mayCreateApiKeys and mayConnectAgentIn take team grants into account.
  • The register (Governance › Competences) lists team grants.
  • The audit log records grants and revocations per team.

For triage

Check who may change a team's members. If that is anyone beyond those who may grant today (owners and admins), a team grant widens what they may confer, and that part needs a person's decision. Identity-provider sync may be such a case: group sync from SSO or SCIM would then confer rights.

SSO and SCIM groups as a source of grants stay out of this issue until team grants land (see #5047).

Done when

  • An admin grants Call models over the API to a team in one dialog, and a member who joins the team later holds the right without another grant.
  • Leaving the team, or revoking the team grant, ends the right.
  • The register shows team grants, and the audit log records them per team.
  • The competences and teams docs are updated in en, de and fr.

Activity

  1. added
    agent-ready
    on Oct 31, 2026
  2. added a commit that references this issue on Oct 31, 2026
    70c891f
  3. added 2 commits that reference this issue on Oct 31, 2026
    f63b06c
    2350b40
  4. added 2 commits that reference this issue on Oct 31, 2026
    3469b3b
    570df7f
  5. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    CollaboratorAuthor

    Landed on release/0.6 with feature train #5221 (merged by rebase on 2026-10-31 at 20:26:51 UTC) as commit 570df7f (feat(platform): grant a competence to a team). It ships with Tale 0.6.0. GitHub closes issues only for commits on main, so the feature-train role closes this one. Task: TALE-280.

  6. added 18 commits that reference this issue on Nov 1, 2026
    0dcdd84
    c57c1bc
    7401af9
    8f567e6
    cd89e8e
    7fecc7c
    a35587a
    09dd627
    54105a1
    76422fc
    21a4cb5
    a817406
    52c1e9d
    2e1bf78
    50218b2
    168cb9f
    f596110
    cc471a6
  7. added a commit that references this issue on Nov 15, 2026
    08d5050
  8. added a commit that references this issue on Nov 23, 2026
    eb23876
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyfeat

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions