docs(sharing): describe the record-level access the app really ships (#549) - #584
Merged
Merged
Conversation
A sharing rule widens the object it names, not the records hanging off it. The widening rules are authored on crm_account only, so a rep who receives an account through a territory rule reads the account and its contacts (controlled_by_parent) while the quotes, contracts and tasks on it stay own-only and opportunities widen only through the >= $100k leadership rules. The docs claimed otherwise: contracts.mdx promised "contracts follow the account's sharing", the security doc documented an account-team roster and Team tab that this app does not ship, and the FAQ told users to ask for a seat on that team. That is the declaration/reality half of #549 — fixed here. No permission set, OWD or sharing rule changed: whether the account's children should follow the account is the business decision still open in the issue. - Sharing & Security: per-related-list table of what a shared account carries, Layer 4 restated as manual shares, account-team roster claim removed (en + zh-Hans + zh-Hant). - Contracts: owner-only visibility documented, with who holds View All. - FAQ: account-team diagnostic replaced with parent/rule/manual-share steps. - crm_admin.md: the Account Team rule is criteria-based, not a roster. - sales_rep / service_agent profiles: comments no longer claim cross-team visibility that no sharing rule delivers. New guards in test/sharing-coverage.test.ts pin, per account child, whether its records are parent-derived, partially shared or own-only, and keep the admin docs matching that ledger — so closing the gap stays a decision instead of drift. Refs #549
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
os-zhuang
marked this pull request as ready for review
August 2, 2026 11:01
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.
Description
A sharing rule widens the object it names, never the records hanging off it. HotCRM authors its widening rules on
crm_accountonly (north_america_territory,europe_territory,account_team_sharing), so a rep who receives an account through a territory rule reads the account and its contacts (controlled_by_parent) — while the quotes, contracts and tasks on it stay own-only and opportunities widen only through the ≥ $100k leadership rules.The docs claimed otherwise.
contracts.mdxpromised "Contracts follow the account's sharing — if you can see the account, you can see its contracts", the security doc documented an account-team roster and a Team tab this app does not ship, and the FAQ told users to ask for a seat on that team. That is the declaration-vs-reality half of #549 and it is what this PR fixes.No permission set, OWD or sharing rule changed. Whether quotes, contracts and tasks should follow the account is the business decision the issue asks for; the options and their costs are written up in a comment on #549.
Type of Change
Related Issues
Related to #549 (the record-level decision stays open), follows #547.
Changes Made
sales_manager; the "you're on the account team" combine-rule and user tip replaced.src/docs/crm_admin.md: the Account Team rule row says what it grants; a paragraph records the own-only reach of the account's children and points at the open decision.sales-rep/service-agentprofiles: comments no longer claim cross-team visibility that no sharing rule delivers, and warn against widening the grants to paper over Sharing coverage gap: territory/team-shared accounts show quote, task and contract related lists the rep cannot read #549.test/sharing-coverage.test.ts(new): guards described below.Testing
pnpm test— 646 passed, 1 skipped)pnpm lint)pnpm build)pnpm verify(validate → typecheck → lint → hygiene → build → test) greentest/sharing-coverage.test.tsholds a ledger of every object hanging offcrm_account, classifiedderived/partial/own_only, and asserts:sales_rep/service_agentkeepownscope on the own-only children (no silentviewAllRecords);src/sharing/rule-for-rule (object, access level, position), the positions block matchesCrmPositions, and the related-list table's promises match the ledger;Both directions were negative-tested: flipping a ledger entry and restoring the old contracts.mdx sentence each turn the suite red.
Screenshots
n/a — documentation and test-only change.
Checklist
.changeset/sharing-coverage-docs-truth.md)Additional Notes
Two adjacent defects were found and deliberately left alone — each is the same "docs describe something that isn't shipped" class but a different subject, and folding them in would bury the sharing fix:
Competitorobject. The OWD table lists Competitor — Public Read-Only, andprofiles.mdxhas three personas reading "competitor battlecards". No such object exists; competitors are a picklist oncrm_opportunity.sharing-and-security.mdxalready states the flat rule, so the feature docs contradict it.Both are worth their own issues.
Generated by Claude Code