Skip to content

Update all old project permissions filters#83

Merged
ChrisPenner merged 2 commits into
mainfrom
cp/update-project-permissions
May 28, 2025
Merged

Update all old project permissions filters#83
ChrisPenner merged 2 commits into
mainfrom
cp/update-project-permissions

Conversation

@ChrisPenner
Copy link
Copy Markdown
Member

@ChrisPenner ChrisPenner commented May 28, 2025

Overview

  • Run migration to create new function THEN
  • Deploy THEN
  • drop old tables/views

A bunch of old project permissions checks only knew about whether a project was public, owned by the caller, or part of an org, they didn't respect project-maintainer roles.

This updates all the relevant queries to use the new permissions system.

Affects:

  • Causal importing
  • Project Search
  • Projects list
  • Defn Search
  • Contribution listing
  • Ticket listing
  • Branch listing

Implementation notes

  • Adds a user_has_project_permission SQL function
  • Wires this into all queries in-place of the old accessible_private_projects view

Interesting/controversial decisions

Include anything that you thought twice about, debated, chose arbitrarily, etc.
What could have been done differently, but wasn't? And why?

Test coverage

  • Add additional transcript tests

@ChrisPenner ChrisPenner force-pushed the cp/update-project-permissions branch from b530d55 to 48e9575 Compare May 28, 2025 17:21
@ChrisPenner ChrisPenner marked this pull request as ready for review May 28, 2025 17:31
@ChrisPenner ChrisPenner force-pushed the cp/update-project-permissions branch from ce97f8d to 3833709 Compare May 28, 2025 20:32
@ChrisPenner ChrisPenner merged commit 03c2f36 into main May 28, 2025
8 checks passed
@ChrisPenner ChrisPenner deleted the cp/update-project-permissions branch May 28, 2025 21:10
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.

1 participant