@bison-lab/payload-core 3.13.0 → 3.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -16
- package/dist/access-B3LglN2J.mjs +662 -0
- package/dist/access-B3LglN2J.mjs.map +1 -0
- package/dist/admin.d.mts +25 -5
- package/dist/admin.d.mts.map +1 -1
- package/dist/admin.mjs +443 -178
- package/dist/admin.mjs.map +1 -1
- package/dist/{identity-LAzSeorC.mjs → identity-Dwyq8519.mjs} +1 -1
- package/dist/{identity-LAzSeorC.mjs.map → identity-Dwyq8519.mjs.map} +1 -1
- package/dist/index.d.mts +73 -46
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +55 -557
- package/dist/index.mjs.map +1 -1
- package/dist/{looks-C6kTjvk3.d.mts → looks-Xs6v5vYU.d.mts} +1 -1
- package/dist/{looks-C6kTjvk3.d.mts.map → looks-Xs6v5vYU.d.mts.map} +1 -1
- package/dist/metadata.d.mts +1 -1
- package/dist/metadata.mjs +1 -1
- package/dist/{share-image-C4ILz4p2.mjs → share-image-BlFAJLnd.mjs} +1 -1
- package/dist/{share-image-C4ILz4p2.mjs.map → share-image-BlFAJLnd.mjs.map} +1 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +1 -1
- package/dist/{title-B2-gWQZd.d.mts → title-sWwcCqHT.d.mts} +1 -1
- package/dist/{title-B2-gWQZd.d.mts.map → title-sWwcCqHT.d.mts.map} +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -261,10 +261,13 @@ has its accessible name. Then `payload migrate:create`.
|
|
|
261
261
|
## Roles
|
|
262
262
|
|
|
263
263
|
Settings → Roles is an Admin-editable array. Rank is drag-to-reorder.
|
|
264
|
-
Ticks are
|
|
265
|
-
|
|
266
|
-
is
|
|
267
|
-
|
|
264
|
+
Ticks are the catalogue rows released on Features. Developer is
|
|
265
|
+
implicit — every catalogue feature, including ones not released. That
|
|
266
|
+
row is visible only to a Developer, with every tick on and locked.
|
|
267
|
+
Defaults ship in the package (Theme
|
|
268
|
+
screens on Designer; Designer also has Users and Roles; Admin + Designer
|
|
269
|
+
both store). A site may pass `extras` into `createRoles` — each extra
|
|
270
|
+
is a slug, a display label, and default `grants` — and an Admin can add
|
|
268
271
|
further custom rows and edit any row’s name. Seed slugs stay read-only.
|
|
269
272
|
`canManageBrand` and the other predicates read the saved Global and fall
|
|
270
273
|
back to that seed (plus extras). The package never writes `developer`
|
|
@@ -272,26 +275,30 @@ onto a user row.
|
|
|
272
275
|
|
|
273
276
|
```ts
|
|
274
277
|
createRoles({
|
|
275
|
-
extras: [{ role: "editor", label: "Editor",
|
|
278
|
+
extras: [{ role: "editor", label: "Editor", grants: ["content"] }],
|
|
276
279
|
});
|
|
277
280
|
```
|
|
278
281
|
|
|
279
282
|
## Features
|
|
280
283
|
|
|
281
|
-
Settings → Features is a
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
and
|
|
289
|
-
|
|
290
|
-
`
|
|
284
|
+
Settings → Features is a Developer-only release valve: one switch per
|
|
285
|
+
catalogue row. Off hides the tick on Roles; Developer still has the
|
|
286
|
+
feature. The catalogue is code, grouped for the UI: Pages (Content,
|
|
287
|
+
Publish, API tab), Media, Theme (Colors, Typography, Appearance,
|
|
288
|
+
Identity, Brand assets), and Users (Users, Roles). Features itself is
|
|
289
|
+
not a row. A site may pass `extras` into `createFeatures` — those rows
|
|
290
|
+
appear only there. `canUseFeature(slug)` is true when the row is
|
|
291
|
+
released and a held role is granted it, or when the login is Developer.
|
|
292
|
+
An empty Global falls back to the catalogue defaults. Group slugs
|
|
293
|
+
`pages` and `theme` are true when any child is. `createPages` /
|
|
294
|
+
`createMedia` use `canUseFeature` for create and update (and
|
|
295
|
+
`admin.hidden`). Theme and brand-assets still take `access` arguments —
|
|
296
|
+
pass `canUseFeature("theme")` / `canUseFeature("brand-assets")` as
|
|
297
|
+
`update`.
|
|
291
298
|
|
|
292
299
|
```ts
|
|
293
300
|
createFeatures({
|
|
294
|
-
extras: [{ slug: "doctors", label: "Doctor search" }],
|
|
301
|
+
extras: [{ slug: "doctors", label: "Doctor search", group: "users" }],
|
|
295
302
|
});
|
|
296
303
|
```
|
|
297
304
|
|