Skip to content

Feat/owner only access control - #737

Open
Godwin9911 wants to merge 6 commits into
frappe:developfrom
Godwin9911:feat/owner-only-access-control
Open

Feat/owner only access control#737
Godwin9911 wants to merge 6 commits into
frappe:developfrom
Godwin9911:feat/owner-only-access-control

Conversation

@Godwin9911

Copy link
Copy Markdown

No description provided.

Design doc for removing anonymous/Guest wiki access entirely and adding
an Admin-only "Owner Only" visibility flag to Wiki Document/Wiki Space,
layered on top of the existing per-space role-based access control.
…/Space

Guest never grants read access anymore, regardless of Wiki Space Role
configuration -- every permission hook rejects Guest outright, and the
server-rendered public page path redirects anonymous visitors to /login
instead of rendering or 404ing. Also fixes a live gap where Guest could
already read orphan Wiki Documents.

Adds an Admin-only "Owner Only" checkbox to Wiki Document and Wiki Space
(permlevel-gated), layered on top of the existing per-space role-based
access control: when set, the record is readable only by its owner and
Admin-role users, hidden from everyone else (Technician in particular)
in list views, search, and direct access alike.

New Admin/Technician DocType permission rows follow the same
auto-created-Role convention already used for Wiki Manager/Wiki User.
Admin-only "Owner Only" switch added to Page Settings and Space Settings
→ Permissions, mirroring the existing Published-pill pattern with a red
status badge in the page header. canAccessWiki now also recognizes the
Admin/Technician roles so those users don't hit the Access Denied screen.

The space-roles picker in Permissions no longer offers Guest (inert now
that anonymous access is removed), and new spaces default to open access
instead of seeding a Guest row.
Best-effort coverage, not run/verified in this environment (no local
dev server) -- needs a pass on a real server: genuinely anonymous
visits (fresh browser context, no storage state) redirect to /login
for both the SPA and the server-rendered page route; an Admin-role
user can toggle Owner Only and see the red pill; a Technician-role
user is denied the Owner Only page but still sees a sibling page in
the same space.
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.

1 participant