Skip to content

feat(platform): let a person hold a different role in a project than in the organization #5136

Open

Description

@yannickmonney

Summary

A pilot organization asks for roles at two levels: the organization role a person holds today, and a role per project. An organization role such as Editor keeps its rights in the organization and in every project. A person with a lower organization role, such as Member, can hold a higher role in one project, for example Editor or Developer. Today a person has exactly one role, the one on their organization membership. Teams decide only which projects a person reaches, never what they may do there. This issue records how access works now and the questions a design has to answer. It states no preference.

The request

Es sollte möglich sein, Rollen sowohl global als auch pro Projekt zuzuweisen. Eine globale Rolle wie Bearbeiter/Redakteur soll weiterhin globale Rechte sowie die entsprechenden Rechte in allen Projekten umfassen. Personen mit einer niedrigeren globalen Rolle, etwa Mitglied, sollen in einzelnen Projekten eine abweichende Rolle erhalten können, zum Beispiel Redakteur oder Entwickler.

"It should be possible to assign roles both globally and per project. A global role such as Editor should keep comprising the global rights and the corresponding rights in all projects. People with a lower global role, such as Member, should be able to get a different role in individual projects, for example Editor or Developer."

As read here, a project role only raises a person's rights inside that project. Whether it may also lower an organization role there was not asked and is not confirmed.

What the repository says today (main at b2560c2d7)

One role per person, on the membership. The roles are owner, admin, developer, editor, member and disabled (services/platform/backend/auth/access.ts:83-126). A role grants the same actions on every resource of its kind across the organization (uniformGrants, :49-73). Editor differs from Developer by read-only connectors, sync configurations, automations (wfDefinitions, wfExecutions) and governance policies (:98-109). The member row carries the role; no migration under services/platform/backend/db/migrations/ creates a project member or project role table.

Project access is the audience times the organization role. checkProjectAccess (services/platform/backend/core/projects/access.ts:92-108): owners and admins read, edit and administer every project. Everyone else reaches a project only through its audience, which is either the whole organization or a list of teams (:77-87). Once they reach it, canEdit is EDITOR_ROLES.has(userRole) (:106), and EDITOR_ROLES is owner, admin, developer and editor (services/platform/backend/core/lib/audience.ts:42-47). The domain spec states this as PROJ-R1 to PROJ-R3 with a table (services/platform/backend/domains/projects/spec.md:11-38): a member in a project's team can read it, and its settings are refused to them.

Rights that are not tied to one project.

  • Creating a project needs an editor role (services/platform/backend/domains/projects/service.ts:406-410; see feat(platform): let admins allow members to create projects #5040).
  • Only owners, admins and developers see Automations, "in the navigation and in projects" (docs/en/platform/admin/members-and-roles.md:50).
  • Project secrets and the credential an agent acts as are for owners and admins only (PROJ-R13 and PROJ-R24, spec.md:151, :183).
  • Tasks add one rule on top: every reader creates tasks and works their own (access.ts:14-15; members-and-roles.md:54).

Per-person grants exist, scoped to the organization only. The competence register delegates four platform capabilities without a seat: tale:models.api, tale:notifications.export, tale:rest.act-as and tale:skills.publish (services/platform/lib/shared/competences.ts:23-39). A grant is "scoped by organization" (services/platform/backend/domains/governance/competence.ts:142), and none names a project.

Where a role comes from. Every door writes the one organization role: an admin under Settings › Members, the identity provider's role mapping at each SSO sign-in (services/platform/backend/domains/sso/service.ts:581-597), SCIM provisioning with the connection's default role (services/platform/backend/domains/scim/service.ts:86-92), and a trusted proxy's role header on every hand-off (docs/en/platform/admin/enterprise-sso.md:85).

What the docs promise. "Roles determine permitted actions; project access, teams, and conversation assignments determine which resources a person can reach." (docs/en/platform/admin/members-and-roles.md:6). The role table is at :41-48.

Blast radius (counted at b2560c2d7, not a design)

  • 18 non-test files call checkProjectAccess or hasProjectAccess, and 13 non-test sites test EDITOR_ROLES.has or ADMIN_ROLES.has directly, for example task editing (services/platform/backend/domains/tasks/service.ts:4077) and project creation (projects/service.ts:407).
  • The client's ability (services/platform/lib/permissions/ability.ts, defineAbilityFor) is built from the organization role and referenced in 34 non-test files.
  • The same audience rule covers other team-scoped resources (documents, skills, inbox queues) through core/lib/audience.ts.
  • When a reviewer loses edit access, the review hand-over reads "a role without edit access" (services/platform/tests/manual/reference/automation/tasks.md:60).
  • GET /api/v1/me reports the membership role and capabilities (services/platform/backend/rest/v1-core.ts:352-358). The audit log records role changes per membership.

Questions a design has to answer

  1. Does a project role only raise rights, or may it also lower them (an organization Editor who only reads one project)?
  2. How does it combine with the audience? Does holding a project role admit a person to a team-restricted project, or does it apply only to people the audience already admits? What happens when they leave the team that admitted them?
  3. What does "Developer in a project" mean when Developer's distinguishing rights are organization-wide (automations, connectors, providers, API access)? Does it show the automations installed in that project, let the person build them, or let them equip agents with connectors?
  4. Who may assign a project role: owners and admins, or also the project's editors? May an IdP or SCIM assign it?
  5. Where is it shown and set: the project's settings, the member's page (compare Improvement: give members a right in one place — from their member page, or to a whole team at once #5047), or both?
  6. Does a project role count for reviewer candidates, the review hand-over on access loss, and the audit log?
  7. Would a role per team in a project (every member of team X is Editor in project Y) cover the need, instead of a role per person?

Options (no preference stated)

  1. A project role per person, stored per project. checkProjectAccess takes the higher of the organization role and the project role for the edit right.
  2. A role per team entry of a project's audience: the members of that team get that role in that project.
  3. Project-scoped capability grants in the competence register (for example a project-scoped tale:projects.edit), in the style of Improvement: give members a right in one place — from their member page, or to a whole team at once #5047, instead of a role.
  4. Keep one role, and meet the concrete need with narrower changes, such as feat(platform): let admins allow members to create projects #5040 (members create projects).

Related

#5040 (members creating projects), #5047 (a right from the member's page or for a whole team), #5046, #5044 (pilot findings).

Activity

  1. added
    priority: medium
    needs discussion
    feat
    service: platform
    on Oct 30, 2026
  2. yannickmonney commented on Oct 30, 2026

    @yannickmonney
    ContributorAuthor

    Second relay of the request (2026-10-30, evening):

    Es sollte möglich sein, Rollen sowohl global als auch pro Team/Projekt zuzuweisen.

    "It should be possible to assign roles both globally and per team/project." The first relay said "per project". This one names teams too.

    Today a team membership carries no role. The table public."teamMember" has only the columns id, teamId, userId, membershipKey and createdAt (read from a fresh database on main at 49ce42fdd). A team decides which projects, team-shared skills, documents and inbox queues a person reaches, never what they may do there. So "a role per team" can mean two things, which bears on question 7 and option 2:

    1. a role a person holds within a team, for example a team lead who manages its members;
    2. a role that a team's members get in the projects the team is attached to (option 2).
  3. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    Decision

    Add project roles. A project role gives a person, or a team, a higher role in one project than their organization role. It never lowers a role and never admits anyone.

    The rule

    • Inside a project, the effective role is the higher of the organization role and the best live project role the person holds, either personally or through a team an admin added them to. Owners and admins are unaffected, and a disabled seat reaches nothing.
    • Only the project's audience (the whole organization or a list of teams) decides who reaches the project. A grant applies only while its holder reaches the project. Otherwise it is dormant, shown as such, and it applies again when they reach the project again.
    • The roles are Editor (what an organization Editor may do in that project, including equipping its agents with existing connectors) and Developer (Editor, plus that project's Automations tab and live runs of automations already installed there). Project administration (the audience, secrets, the agent's acting credential) stays with owners and admins.
    • Grants are stored in a new table, app.project_role_grants, with soft revocation. The holder is a person or a team, the same holder model as competence team grants.

    Answers

    1. Raise or lower? Raise only. To keep someone out of a project, restrict its audience.
    2. How does it combine with the audience? The audience admits; a role never does. If a person leaves the team that admitted them, their grant goes dormant. A team grant may name only a team the audience covers. It is revoked automatically when an audience change leaves that team uncovered, including when an organization-wide project is restricted to teams.
    3. What is Developer in a project? Editor, plus that project's Automations tab and live runs of the automations already installed there. Installing or removing an automation, or changing its definition, stays with organization developers and admins: where an automation is installed decides its scope for the whole organization, and an automation installed nowhere is organization-wide. Connectors, credentials, providers, sync configurations, governance and API or model access stay organization-wide.
    4. Who assigns it? Owners and admins only. An identity provider, SCIM or a trusted header never assigns one, and a team grant counts only for memberships an admin made.
    5. Where? It is set in Project settings › Access. It is shown read-only on the member's Rights view and on the team page.
    6. Reviews and audit? Yes. Reviewer candidates and the review hand-over use the effective project edit right. Every grant and revocation, including automatic ones, is in the audit log with its reason.
    7. A role per team instead? That alone does not cover named people, so one table holds both kinds of holder.

    Rationale
    Keeping reach (the audience) and rights (the role) as separate concepts means nobody reaches a restricted project through a side door, and no deny rules need checking at organization-wide doors. Reserving grants to owners and admins, and never letting an identity provider confer one, matches the rule competence team grants already follow and prevents escalation chains. Developer in a project stops at running what is installed there, because changing an automation's installations would widen or narrow it for every other project. Project-scoped capabilities in the competence register (option 3) would overload it, and #5040 alone (option 4) would not let a member edit an existing project.

    Implementation units (base: release/0.6; the spec unit forward-ports PROJ-R29 and numbers new rules from PROJ-R30)

    1. Spec, table and resolver (M)
    2. Grant and revoke API, audit and cascades (M)
    3. Enforce the effective project role at every project door: app, REST and MCP, with per-project access in responses (L)
    4. Developer in a project: run the automations installed there (M)
    5. Reviews follow the effective project edit right (S)
    6. Project settings › Access, per-project client gating, docs in en/de/fr, and manual boxes (L)

    #5040 stays independent.

    Cross-issue amendments (decisions taken together with #5040, #4878, #5374, #5046):

  4. added
    agent-ready
    and removed
    needs discussion
    on Nov 14, 2026
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-readyfeatpriority: mediumservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions