Make profile editing a toggleable permission#81
Open
markgoho wants to merge 5 commits into
Open
Conversation
Use allowProfileEditing as the runtime gate for member profile access so admins can toggle profile editing on and off without relying on a one-time approval timestamp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Preserve auth checks on profile routes while returning allowProfileEditing consistently across the member API and related tests. Also clean up admin-member-detail coverage and make the backfill safer for existing approved members. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the profile creation and edit-profile E2E specs to navigate through the membership UI and keep mocked member documents in sync with slug and profile state changes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update the remaining E2E member API mocks to include allowProfileEditing so the CI e2e typecheck matches the current API contract. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
|
Visit the preview URL for this PR (updated for commit c4d37e4): https://doula-coop-members--pr81-feat-profile-editing-4q1kfjyj.web.app (expires Thu, 02 Apr 2026 15:34:46 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: a71d87896e6e52770e2104660c7490f8b9727d99 |
Prevent profile-editing guard redirects while member data is still loading, strengthen the admin profile-editing route tests, and convert the editing-permission backfill into a runnable script with clear local-emulator behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
profileApprovedAtgate withallowProfileEditingacross functions and membersTest plan
rtk bun test /Users/mgoho/Github/doula-cooperative/functions/src/admin-members-api/routes/approve-profile.test.ts /Users/mgoho/Github/doula-cooperative/functions/src/admin-members-api/routes/link-profile.test.ts /Users/mgoho/Github/doula-cooperative/functions/src/profiles-api/routes/create-profile.test.ts /Users/mgoho/Github/doula-cooperative/functions/src/profiles-api/routes/write-profile.test.tsrtk bun test /Users/mgoho/Github/doula-cooperative/members/src/app/admin/users/admin-member-detail/admin-member-detail.spec.ts /Users/mgoho/Github/doula-cooperative/members/src/app/membership/membership.spec.ts /Users/mgoho/Github/doula-cooperative/members/src/app/header/header.spec.ts /Users/mgoho/Github/doula-cooperative/members/src/app/guards/profile-editing.guard.integration.spec.ts(currently blocked by an existing Angular router/JIT test-runner issue in this repo)🤖 Generated with Claude Code