Conversation
Introduce per-organization roles (readonly, member, admin) using the existing organization_users.admin flag plus a new read_only column. Organization-scoped controllers enforce write access for non-GET requests, and the user admin UI exposes a role selector per organization. Includes request and model specs covering read-only authorization. Co-authored-by: Cursor <cursoragent@cursor.com>
5 tasks
Add readonly-release workflow for arunblitz/postal that runs tests, builds the full image, pushes to ghcr.io/<owner>/postal-readonly, and creates a GitHub Release when a readonly version tag is pushed. Skip upstream postalserver CI publish jobs on forks to avoid GHCR permission failures against ghcr.io/postalserver/postal.
Explain that readonly tags are custom feature builds, not official Postal releases. Set a clearer release title for future tag builds.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Adds per-organization user roles so teams can grant view-only access without full write permissions.
organization_users.adminflag for org-level managementThis builds on dormant schema fields already present on
organization_usersand adds aread_onlyboolean column.Motivation
Postal currently distinguishes global admins from organization members, but org members effectively have full write access. Several environments need auditors, support staff, or clients to view configuration and message metadata without changing settings.
This aligns with prior maintainer feedback on access control features being implemented per user rather than via global config (see #2287).
Implementation
OrganizationAuthorizationconcern blocks non-GET requests for read-only org membersWithinOrganizationacross org-scoped controllersTest plan
bundle exec rspec spec/models/organization_user_spec.rb spec/requests/readonly_organization_access_spec.rbpostal upgrade/db:migrateon an existing installationNotes
Happy to adjust naming, expand UI coverage, or discuss how this relates to other dormant
organization_usersfields (all_servers,user_type) before merge.