Parent: #1079 · Splits #1043 §1 · Project: https://github.com/orgs/OWASP/projects/60
What
A logged-in user with a non-empty saved selection (GET /rest/v1/user/resources) should see that set (plus OpenCRE) as the default view on CRE and standard pages.
Today the selection is stored and the picker works, but /cre/{id} still loads the full graph. Server filter only hits GET /rest/v1/standards. The old URL filter (?applyFilters=true&filters=…) and the unused include_only= query on /rest/v1/id/… are the two existing hooks.
Implementation notes (pick one, do not invent a third store)
Preferred: reuse existing machinery.
- A (frontend): after login, if selection is non-empty, hydrate
applyFilters / filters= from /user/resources (same applyFilters.tsx / DocumentNode path).
- B (backend): pass selection as
include_only on get_CREs / node fetch (include_only_nodes already filters linked standard names).
Empty selection must remain “show everything”. OpenCRE is always kept.
Also on this ticket: view chrome
Do not bury the control only on /myopencre.
Success
- Logged in, selection
[ASVS, CWE] → CRE page hides SAMM/NIST/… links by default
- “Show all” restores the full node without clearing the saved selection
- Empty selection → full node
- Tests cover logged-in filtered, logged-in empty, anonymous full
Related
Parent: #1079 · Splits #1043 §1 · Project: https://github.com/orgs/OWASP/projects/60
What
A logged-in user with a non-empty saved selection (
GET /rest/v1/user/resources) should see that set (plus OpenCRE) as the default view on CRE and standard pages.Today the selection is stored and the picker works, but
/cre/{id}still loads the full graph. Server filter only hitsGET /rest/v1/standards. The old URL filter (?applyFilters=true&filters=…) and the unusedinclude_only=query on/rest/v1/id/…are the two existing hooks.Implementation notes (pick one, do not invent a third store)
Preferred: reuse existing machinery.
applyFilters/filters=from/user/resources(sameapplyFilters.tsx/DocumentNodepath).include_onlyonget_CREs/ node fetch (include_only_nodesalready filters linked standard names).Empty selection must remain “show everything”. OpenCRE is always kept.
Also on this ticket: view chrome
Do not bury the control only on
/myopencre.?all=true(session still logged in, graph unfiltered)Success
[ASVS, CWE]→ CRE page hides SAMM/NIST/… links by defaultRelated
apply_user_resource_filterinapplication/web/web_main.pyapplication/frontend/src/hooks/applyFilters.tsxapplication/frontend/src/components/ResourceSelector/ResourceSelector.tsx