Skip to content

chore(schema): drop dead duplicate app_organization_viewer definition#1761

Merged
rohilsurana merged 1 commit into
mainfrom
chore/drop-duplicate-org-viewer-definition
Jul 16, 2026
Merged

chore(schema): drop dead duplicate app_organization_viewer definition#1761
rohilsurana merged 1 commit into
mainfrom
chore/drop-duplicate-org-viewer-definition

Conversation

@rohilsurana

Copy link
Copy Markdown
Member

What

Removes the second app_organization_viewer entry from schema.PredefinedRoles. The list has carried two definitions under the same name since #399 added one titled "Organization Group Viewer" (retitled "Group Viewer" in #1705):

{
    Title: "Member",
    Name:  RoleOrganizationViewer,
    Permissions: []string{"app_organization_get"},
    Scopes: []string{OrganizationNamespace},
},
{
    Title: "Group Viewer",
    Name:  RoleOrganizationViewer,        // same name, same permissions, same scopes
    Permissions: []string{"app_organization_get"},
    Scopes: []string{OrganizationNamespace},
},

Why it is dead code

The entry has never had any effect:

  • Boot: MigrateRoles walks the list in order. The first entry creates (or matches) the role; when the second one runs, the role already exists. The reconcile path only rewrote a role when its permissions differed — and the two entries' permissions are identical — so the second entry never wrote anything, on any version.
  • Lookups: every consumer that searches PredefinedRoles by name takes the first match.

So the role every installation actually has is the first definition ("Member"). Removing the duplicate changes no behavior on fresh boots or upgrades; it just makes the list mean what it says.

No functional changes. Existing bootstrap and schema tests pass unchanged.

@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
frontier Ready Ready Preview, Comment Jul 15, 2026 9:39am

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 6b50d2ad-bbcc-4c0d-9d32-fc107f6de0c5

📥 Commits

Reviewing files that changed from the base of the PR and between da6059c and ab82fa3.

📒 Files selected for processing (1)
  • internal/bootstrap/schema/schema.go
💤 Files with no reviewable changes (1)
  • internal/bootstrap/schema/schema.go

📝 Walkthrough

Summary by CodeRabbit

  • Updates
    • Renamed the organization viewer role from “Group Viewer” to “Member.”
    • Role permissions and access scopes remain unchanged.

Walkthrough

The predefined organization-scoped viewer role is relabeled from “Group Viewer” to “Member”; its role name, permission, and scope remain unchanged.

Changes

Organization role title

Layer / File(s) Summary
Update predefined role title
internal/bootstrap/schema/schema.go
RoleOrganizationViewer now has the title "Member" while retaining the app_organization_get permission and OrganizationNamespace scope.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 29405295788

Coverage remained the same at 45.198%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 37701
Covered Lines: 17040
Line Coverage: 45.2%
Coverage Strength: 12.69 hits per line

💛 - Coveralls

@rohilsurana rohilsurana merged commit 27ca236 into main Jul 16, 2026
8 checks passed
@rohilsurana rohilsurana deleted the chore/drop-duplicate-org-viewer-definition branch July 16, 2026 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants