GeezerVison is showing github.com — feat: add the organization_skill RBAC resource and skill queries by ibetitsmike · Pull Request #30586 · coder/coder
Conversation
ibetitsmike
commented
Oct 10, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Part of CODAGT-1341.
Adds authorization and queries for organization skills, with no routes yet.
- RBAC resource
organization_skill with create, read, update, delete and share. Owner and org admin get it automatically; site and org auditors get read. Members get no role grant and can read a skill only through its ACL, which the policy applies only to members of the skill's organization. API keys can request organization_skill:{read,create,update,delete,share,*}.
- Migration
000617_organization_skill_resource adds the resource_type and api_key_scope enum values; its down is a no-op because enum values cannot be dropped. codersdk.ResourceTypeOrganizationSkill is added; the audit mapping comes in a later layer.
Skill.RBACObject() returns ResourceOrganizationSkill.WithID(id).InOrg(org) with both ACLs for organization rows; project rows stay denied to everyone.
- Queries in
queries/skills.sql: insert, get by organization and name, ListOrganizationSkillMetadataByOrganizationID (no content; -- @authorize_filter), update with optional sqlc.narg description, content and enabled (so toggling enabled is one statement), and delete. The list goes through the handwritten GetAuthorizedOrganizationSkillMetadata and regosql.OrganizationSkillConverter() (organization ID, both ACL columns, owner always false).
- dbauthz: insert checks create on
InOrg(org); get, update and delete fetch the row and check its object, so ACLs apply. dbgen.OrganizationSkill adds test rows. ACL write queries come later.
Testing
coderd/rbac/roles_test.go role matrix (a user ACL grant lets an org member read but not write or share, and does nothing for a non-member), TestOrganizationSkillReadScope (a read key can't write or share), TestSkillRBACObjectOrganizationACL (a grant allows read, not update).
TestOrganizationSkillAuthorization (real Postgres, strict authorizer): the site owner, org admin and org auditor list every skill; members see only skills shared through Everyone, their group or a user grant; granted non-members and other orgs' members see nothing; a read grant cannot write. TestMethodTestSuite/TestOrganizationSkills covers every new dbauthz method.
- Red-green: dropping the auditor grants, the scope entry, the object's ACLs, the converter's ACL matchers, or the list's SQL filter each failed the matching test.
- Ran
make pre-commit, make lint/check-scopes, golangci-lint and package tests at each commit.
Review record
This stack adds organization skills to Coder Agents: admins publish a skill once per organization, share it with groups or members, and chats in that organization load it next to personal and workspace skills.
Stack, bottom to top: #30584, #30585, #30586, #30587, #30588, #30589, #30590, #30591, #30592, #30593, #30594, #30595, #30596, #30597, #30598, #30599, #30600, #30601, #30602, #30603, #30604.
Xum opened this PR on behalf of @ibetitsmike.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
chatgpt-codex-connector[bot] reacted with thumbs up emoji
This was referenced Oct 10, 2026
ibetitsmike
changed the title
mike/org skills/authz
feat: add the organization_skill RBAC resource and skill queries
Oct 10, 2026
This was referenced Oct 10, 2026
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
✅ Completed 2026-10-10T01:39:08.321588Z |
1e16b30 |
Manual request |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
Codex Review: Didn't find any major issues. Hooray!
Reviewed commit: 1e16b3004c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|