@cosmicdrift/kumiko-headless 0.260.0 → 0.261.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/package.json +2 -2
- package/src/nav/resolve.ts +2 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cosmicdrift/kumiko-headless",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.261.0",
|
|
4
4
|
"description": "Headless UI logic for Kumiko — Dispatcher contract, Form-Controller, View-Model, Nav-Resolver. Plattform- und React-frei; jeder Renderer (renderer, renderer-web, renderer-native, …) komponiert darauf.",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"author": "Marc Frost <marc@cosmicdriftgamestudio.com>",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@cosmicdrift/kumiko-framework": "0.
|
|
39
|
+
"@cosmicdrift/kumiko-framework": "0.261.0",
|
|
40
40
|
"temporal-polyfill": "^0.3.2",
|
|
41
41
|
"zod": "^4.4.3"
|
|
42
42
|
},
|
package/src/nav/resolve.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AccessRule, NavDefinition } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
|
+
import { isOpenToAllGranted } from "@cosmicdrift/kumiko-framework/ui-types";
|
|
2
3
|
import type { NavNode, NavTree, ResolveNavigationOptions } from "./types";
|
|
3
4
|
|
|
4
5
|
// Assembles the renderable nav tree from the registry's pre-grouped
|
|
@@ -69,7 +70,7 @@ function userCanSee(
|
|
|
69
70
|
// No rule = always visible — matches the framework's "engine stays
|
|
70
71
|
// un-opinionated about who sees what" stance in the nav docs.
|
|
71
72
|
if (!access) return true;
|
|
72
|
-
if ("openToAll" in access && access
|
|
73
|
+
if ("openToAll" in access && isOpenToAllGranted(access)) return true;
|
|
73
74
|
if (!user) return false; // anonymous can't match a role-gated rule
|
|
74
75
|
if ("roles" in access) {
|
|
75
76
|
const allowed = access.roles;
|