Skip to content

feat: define guest demo baseline with readers group and read-only tests - #111

Open
johnnyhuy wants to merge 1 commit into
mainfrom
agent/issue-110-guest-demo-baseline
Open

johnnyhuy wants to merge 1 commit into
mainfrom
agent/issue-110-guest-demo-baseline

Conversation

@johnnyhuy

Copy link
Copy Markdown
Contributor

Part of #85
Closes #110

What changed: the guest demo user now actually exists in the catalog. Added user:default/guest in examples/users/guest.yaml with memberOf readers, plus the readers, developers and admins groups named by the permission policy in examples/groups/. Made the guest userEntityRef explicit in app-config.yaml to match production, and added docs/demo-baseline.md (in the mkdocs nav) stating what a guest can and cannot do.

How it was verified:

  • mise run install - passed
  • mise run lint - passed (packages/backend 1 file, permission module 3 files, theme 1 file, plausible 8 files, packages/app 46 files, no errors)
  • mise run test - passed: 3 suites passed, 1 skipped, 21 tests passed (was 16). New tests in plugins/permission-backend-module-default/src/module.test.ts: allows the guest demo user to read, denies the guest demo user the create action, denies the guest demo user the update action, denies the guest demo user the delete action, denies the guest demo user scaffolder actions.
  • mise run dev - frontend on localhost:3000 and backend on localhost:7007 both came up. Signed in as guest in a browser and opened /catalog/default/user/guest. The page rendered the Guest user with a Readers group link, which proves the new entities are ingested and the guest can read the catalog. Frontend and config only in effect, plus catalog sample data, so mise run build (Docker image) was not run.

Proof:
Browser snapshot of /catalog/default/user/guest after guest sign-in showed the USER Guest heading, the guest email, and a Readers link in the membership list. The screenshot command (agent-browser screenshot) hung twice and was terminated, so no PNG is attached. Capture method: agent-browser snapshot succeeded, PNG capture was blocked. The test and lint transcripts above are the behaviour proof for the policy change, and docs/demo-baseline.md is itself the document proof for the config part.

Known gaps and follow-ups:

This branch has not been deployed

No deployments
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.

Define guest demo baseline: guest user in readers group, read-only tests and docs

1 participant