Skip to content

refactor: getProjectForViewer - #204

Merged
robsimmons merged 2 commits into
mainfrom
get-project-for-viewer
Oct 30, 2026
Merged

robsimmons merged 2 commits into
mainfrom
get-project-for-viewer

Conversation

@robsimmons

@robsimmons robsimmons commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Given that we've had three repetitions of the pattern "look up owner, look up project, check if the logged-in user has access to /, and those were all the uses of canAccessProject(), this captures the repeated protocol (but still expects the caller to get the session, presumably via requireAuth, and to respond to a failed lookup, presumably via notFound)

@robsimmons
robsimmons changed the base branch from main to push-vxyytpspwzuv October 29, 2026 20:09
@robsimmons
robsimmons added this pull request to stack #195 October 29, 2026 20:09
@robsimmons
robsimmons requested a review from jcreedcmu October 29, 2026 20:10
@robsimmons
robsimmons force-pushed the get-project-for-viewer branch from b091f74 to e11116e Compare October 29, 2026 20:12
Base automatically changed from push-vxyytpspwzuv to main October 29, 2026 20:22
@robsimmons
robsimmons force-pushed the get-project-for-viewer branch from e11116e to 8d700d5 Compare October 29, 2026 20:22
@robsimmons
robsimmons merged commit c8654ea into main Oct 30, 2026
1 check passed
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.

2 participants