Skip to content

Task 7: Add team owner AI opt-out via team properties #7316

@cstns

Description

@cstns

Description

Team owners currently have no way to opt out of AI features on their own. This is especially problematic on the cloud platform where team owners are not admins. This task introduces the third level of the hierarchy, allowing team owners to disable AI for their
team regardless of platform and team type settings.

Team properties:

  • Store an ai preference under Team.properties.features.ai
  • This is already supported by the existing feature property hierarchy in forge/db/models/Team.js:470-476, which checks team.properties.features before falling back to teamType.properties.features
  • When a team owner sets ai to false, it overrides the team type setting for that specific team

Backend:

  • Add an API endpoint (or extend an existing team settings endpoint) that allows team owners to toggle the ai feature for their team
  • Gate this behind an appropriate permission (e.g. team:edit or a new team:settings:ai permission)
  • Ensure that the toggle can only disable AI, not enable it beyond what the team type allows. If the team type has ai disabled, the team-level toggle should have no effect and the UI should reflect that

Frontend:

  • Add an AI toggle to the team settings UI, accessible to team owners
  • The toggle should be disabled (greyed out) if AI is disabled at the platform or team type level, with a message explaining that AI is not available for their team type
  • When enabled at platform and team type level, the toggle should default to the team type setting and allow the team owner to opt out

All AI feature gating:

  • All backend checks introduced in Tasks 3, 4, 5, and 6 that call Team.getFeatureProperty('ai', false) will automatically respect the team-level override since the existing property hierarchy already prioritizes team properties over team type properties
  • Verify that this is the case and that no additional changes are needed in the gating logic

Expected result:

  • Team owners can disable AI features for their team via team settings
  • The opt-out is respected across all AI features: nr-assistant plugin installation, inline completions, snapshot descriptions, expert assistant, and expert insights
  • Team owners cannot enable AI if it is disabled at platform or team type level
  • The preference persists and is respected on subsequent deployments and settings responses

Epic/Story

No response

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate

Metadata

Metadata

Assignees

Labels

taskA piece of work that isn't necessarily tied to a specific Epic or Story.

Type

No type
No fields configured for issues without a type.

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions