You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d05ed57
Browse filesBrowse the repository at this point in the historyBrowse files
fix(content): verified access flows, docs screenshots and not-found pages
- Render a plugin route's notFound screen inside the route's own messages,
and skip its breadcrumb when there is no loader data, so a hidden or
missing forum shows "Forum not found" instead of a server error
- Show a restricted attachment without the deleted-file strikethrough
- Word the inherit hints in the Access sheet as what Inherit resolves to
- Add real screenshots of the Access sheet, effective access, the guest
forum list and sign-in state, the restricted attachment and the article
editor notice to the access docs
- Ignore storage/private in the web app
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CnAiFc4gJkRmXr1TwfkSNX
A rule on **Download attachments** only protects files nobody can fetch by URL. This guide sets up private storage, so files of access-controlled content are served only through a route that checks the reader every time, and moves the files that are still public.
8
11
9
12
## How files are served
@@ -14,7 +17,15 @@ Every content type with access rules gets a download route, `GET /api/{plugin}/c
14
17
2. the file belongs to that record: a file field holds it, or one of its rich-text documents names it;
15
18
3. for anything but an image, the reader may also **download attachments**.
16
19
17
-
Images follow **Read**: anyone who can read an article sees its images, and anyone who can see an image can save a copy of it. **Download attachments** covers files offered for download, such as PDFs and archives. A reader without it sees **An attachment is available. You do not have permission to download it.**, with no name, size or link. File fields work the same way, with `restricted: true` on the descriptor.
20
+
Images follow **Read**: anyone who can read an article sees its images, and anyone who can see an image can save a copy of it. **Download attachments** covers files offered for download, such as PDFs and archives. A reader without it sees **An attachment is available. You do not have permission to download it.**, with no name, size or link:
21
+
22
+
<ImgDocs
23
+
withoutBackground
24
+
src={attachmentRestricted}
25
+
alt="A topic for a member without the download rule: the paragraph above the attachment, then a dashed box with a locked file icon, An attachment is available. and You do not have permission to download it."
26
+
/>
27
+
28
+
File fields work the same way, with `restricted: true` on the descriptor.
18
29
19
30
Responses are `private, no-store`, `nosniff` and sandboxed. Nothing is served through a signed URL, so taking a role away blocks the next download at once.
A content type can hold access scopes of its own: every record gets view, read, comment and download rules, like a forum does. The Blog plugin uses this for categories, and an article is readable only when **every** one of its categories allows it.
20
23
21
24
Use it when the scopes are records you already manage in the AdminCP, such as categories or tags, rather than a [container tree](/docs/content-engine/access). The actions, audiences and prerequisites are the same as for containers.
@@ -81,6 +84,12 @@ Open **AdminCP → Categories** (`/admin/content/blog/categories`). In a categor
81
84
82
85
The article editor shows **Who can see this** under the categories field. It asks the server what the selected categories require together, so it is right before you save.
83
86
87
+
<ImgDocs
88
+
withoutBackground
89
+
src={categoryNotice}
90
+
alt="The article editor with the categories News and Insiders selected, and the Who can see this panel below: View Everyone, Read, Comment and Download attachments Members with VIP, and a note that a reader has to meet the rule of every category"
Access rules decide who may see a container, read what is filed in it, reply there and download its attachments. Use them for a staff-only forum, a members-only board, or a VIP section that only some roles can open.
24
30
25
31
This guide uses the Forum plugin: the `forum.forums` collection, topics filed into forums and comments that follow their topic.
@@ -94,10 +100,14 @@ Turn access on only when every custom route of the plugin that reads topics or c
94
100
95
101
Open **AdminCP → Forums** (`/admin/containers/forum/forums`). In a forum's row menu, choose **Access**.
96
102
97
-
{/* Image prompt: AdminCP Access sheet for the forum "Members", with View set to Signed-in members, Read inheriting, and the Effective access panel listing "Signed-in members - set here" for each action */}
98
-
99
103
Set **View** to **Signed-in members** for a forum called "Members", and choose **Save access**. Every action left on **Inherit** follows the nearest parent forum that sets it, then the collection's defaults. The **Effective access** panel below the fields shows what applies once parent forums are counted, and updates as you change the fields.
100
104
105
+
<ImgDocs
106
+
withoutBackground
107
+
src={accessSheet}
108
+
alt="The Access sheet of the Members forum in the AdminCP: View set to Signed-in members, Read, Comment and Download attachments on Inherit (Everyone), and the Effective access panel showing Signed-in members for every action"
109
+
/>
110
+
101
111
Saving needs the collection's `can_edit` admin permission. The rules apply from the next request, including to members who are signed in right now.
102
112
103
113
</Step>
@@ -108,7 +118,15 @@ Saving needs the collection's `can_edit` admin permission. The rules apply from
108
118
109
119
Under "Members", create a forum called "VIP". Open its **Access** sheet, set **View** to **Selected roles** and pick a VIP role, then save.
110
120
111
-
A child can be stricter than its parent, never more open: to reach "VIP", a member has to pass the rules of "Members" too. With "General" left on **Inherit** beside it:
121
+
A child can be stricter than its parent, never more open: to reach "VIP", a member has to pass the rules of "Members" too. Its **Effective access** panel lists both requirements:
122
+
123
+
<ImgDocs
124
+
withoutBackground
125
+
src={effectiveChild}
126
+
alt="The Effective access panel of the VIP forum: every action needs Signed-in members, required by Members, a parent, and Members with VIP, set here"
@@ -124,7 +142,21 @@ A child can be stricter than its parent, never more open: to reach "VIP", a memb
124
142
125
143
Sign out and open `/forum`. "Members" and its children are gone from the forum list, and `/forum/members` answers **Forum not found**, as if it never existed. Sign in as a member without the VIP role: "Members" and "General" appear, "VIP" does not. Search for a topic title from "VIP" as both visitors: only a member with the role finds it.
126
144
127
-
To try a forum readers may see but not read, set **View** to **Everyone** and **Read** to **Signed-in members**. Guests then see the forum with a **Restricted** label, and its page asks them to sign in instead of listing topics.
145
+
To try a forum readers may see but not read, set **View** to **Everyone** and **Read** to **Signed-in members**. Guests then see the forum with a **Restricted** label:
146
+
147
+
<ImgDocs
148
+
withoutBackground
149
+
className="*:max-w-full"
150
+
src={forumRestricted}
151
+
alt="The forum list as a guest: General with its topic count and latest topic, and Announcements with a Restricted label and no counts"
152
+
/>
153
+
154
+
Its page and its topics ask guests to sign in instead of showing anything. A signed-in member without access sees **You don't have access here** instead.
155
+
156
+
<ImgDocs
157
+
src={signIn}
158
+
alt="A topic page for a guest: a lock icon, Sign in to read this, a Sign in button and a link back to all forums"
0 commit comments