---
title: "Rolling out Roles"
description: "incident.io added role-based access control by mapping a fixed set of customer-facing roles (owner, admin, etc.) to granular internal scopes."
url: "https://swe.quest/articles/rolling-out-roles-feb5c6f49f33b701"
canonical: "https://incident.io/blog/rolling-out-roles"
source: "incident.io"
published: "2022-03-11"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["identity-auth","deployment","product-engineering","go","typescript"]
---

# Rolling out Roles

A post on [incident.io](https://swe.quest/sources/incident-io.md), published 2022-03-11, 6 min read, Case study. Original: [https://incident.io/blog/rolling-out-roles](https://incident.io/blog/rolling-out-roles)

## Summary

incident.io added role-based access control by mapping a fixed set of customer-facing roles (owner, admin, etc.) to granular internal scopes. A variadic getIdentity(ctx, requiredScopes...) check in Go puts each API's permission behind a one-line change, and generated type-safe scope enums let the TypeScript frontend gate UI such as a GatedButton. Rollout used a per-organization enforcement timestamp with a March 1st deadline and owner opt-in. Initial owners were the original installers and admins were inferred from past product usage, with owners prompted to review both.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Deployment](https://swe.quest/tags/deployment.md) (Reliability & operations)
- [Product engineering](https://swe.quest/tags/product-engineering.md) (Engineering organization)
- [Go](https://swe.quest/tags/go.md) (Languages)
- [TypeScript](https://swe.quest/tags/typescript.md) (Languages)

## Prerequisites

- RBAC concepts
- Go basics ([easy posts on Go](https://swe.quest/tags/go.md?difficulty=easy))

## Keywords

incident.io, RBAC, Slack, Private Incidents

## Related posts

- [Role Management at Slack](https://swe.quest/articles/role-management-at-slack-b07a74302caf6820.md): Slack Engineering · 2021-05-24 · Medium · 9 min read · Identity & auth, System design, Microservices, Deployment, Go
  Slack replaced its coarse guest/member/admin/owner hierarchy with a role-based access control system that grants granular permissions such as ARCHIVE\_CHANNEL scoped to an enterprise or workspace entity.
- [Onboarding yourself as an engineer at incident.io](https://swe.quest/articles/onboarding-yourself-as-an-engineer-at-incident-io-0fce0735d9296049.md): incident.io · 2024-07-05 · Medium · 4 min read · Infrastructure as code, Engineering culture, Developer productivity
  New engineers at incident.io onboard themselves by opening a PR to the infrastructure repo that adds them as a user, puts them on a team in a Jsonnet config, and defines a Spacelift dev stack.
- [Now you see me, now you don't: feature-flagging with LaunchDarkly at incident.io](https://swe.quest/articles/now-you-see-me-now-you-don-t-feature-flagging-with-launchdarkly-at-incident-io-cb6cda92c3363bee.md): incident.io · 2021-11-09 · Medium · 6 min read · Deployment, Go, React, Testing
  incident.io ships to production many times a day and uses feature flags to merge large features like Announcement Rules incrementally while hiding them from customers until launch.
- [Organizing ownership: How we assign errors in our monolith](https://swe.quest/articles/organizing-ownership-how-we-assign-errors-in-our-monolith-a4731f02c7358da3.md): incident.io · 2024-11-18 · Medium · 7 min read · Observability, Incidents & postmortems, Go, CI/CD
  incident.io assigns error ownership inside its monolith by dividing the codebase into team-owned units (apps, backend feature packages, integrations), each with a required jsonnet module file declaring owner, criticality and customer-facing features.
- [Staying Evergreen: How we automated secure access and repo hygiene in a shared org](https://swe.quest/articles/staying-evergreen-how-we-automated-secure-access-and-repo-hygiene-in-a-shared-b76aa86640c047a2.md): GitHub Engineering · 2026-10-15 · Medium · 8 min read · Identity & auth, Developer tools, Security, System design
  Evergreen is a Go-based GitHub App that automates quarterly outside-collaborator access reviews and stale-repo archival in a shared org of 1,400+ GitHub employees, customers and partners, built entirely from native primitives: scheduled Actions firing repository\_dispatch, webhooks, issue checklists, custom properties, and per-repo JSON state files in git that double as the audit trail.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
