Skip to content

Apply saved standards selection on CRE and standard pages #1081

Description

@northdpole

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium PriorityenhancementNew feature or requestnot ready for developmentNeeds design/agreement before implementationuntriagedNot yet triaged by maintainers

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions