@entifix/authz 0.13.0 → 0.15.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.
@@ -5,7 +5,7 @@ import type { ScreenType } from './screen-type.js';
5
5
  *
6
6
  * This is the permission-annotated half of navigation, which is why it lives with
7
7
  * the authorization vocabulary rather than in a shell: an entry and the route
8
- * behind it must be expressed in the same terms `requirePermission` enforces, and
8
+ * behind it must be expressed in the same terms an endpoint's `guard` enforces, and
9
9
  * `can` — the filter every layer applies — is declared right next to it.
10
10
  *
11
11
  * It is also the one package both a shell and the host application depend on.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/values/guarded-nav.ts"],"sourcesContent":["import type { Permission } from './permission.js';\nimport type { ScreenType } from './screen-type.js';\n\n/**\n * A navigation destination plus the permission it requires, if any.\n *\n * This is the permission-annotated half of navigation, which is why it lives with\n * the authorization vocabulary rather than in a shell: an entry and the route\n * behind it must be expressed in the same terms `requirePermission` enforces, and\n * `can` — the filter every layer applies — is declared right next to it.\n *\n * It is also the one package both a shell and the host application depend on.\n * That matters because a shell contributes its own nav\n * fragment to whichever host mounts it, and shells may not depend on each other.\n *\n * `label`/`title` are **namespace-qualified catalog keys**, not copy. Whoever\n * renders the list does not necessarily own its wording, so the namespace travels\n * with the key — and spelling it out is also what makes an `app:` key visible to\n * the lint rule that keeps those keys inside `apps/`.\n *\n * Filtering on these is **presentation only**. Hiding an entry protects nothing;\n * the service is what refuses the request.\n */\nexport interface GuardedNavItem {\n label: string;\n href: string;\n icon?: string;\n /**\n * When set, the item also offers \"Open in workspace\" — a link to\n * `/workspace?tab=<workspace>`.\n */\n workspace?: string;\n /** Omit to show the item to every signed-in user. */\n permission?: Permission;\n /**\n * Also gate this item on the acting organization's provisioning — the second\n * ceiling, beside the role — using the domain segment of its own {@link permission}.\n *\n * A boolean rather than a domain name, because the domain is already written\n * one line up: a second string here could disagree with the permission the\n * route behind it actually checks, which is the drift this whole interface\n * exists to prevent.\n *\n * **Omitted is the right answer for most items.** An organization is not\n * \"provisioned for\" `catalog-reference`, `config` or `authn` — those are\n * operator-owned, and `catalog-reference` is explicitly never grantable\n *. Setting this on one of them would hide the platform's own\n * vocabulary from every vendor.\n *\n * Setting it without a `permission` is a declaration error and throws: there\n * would be no domain to read, and both possible defaults — always shown,\n * always hidden — read as a bug somewhere else entirely.\n *\n * A session with **no** organization ignores this flag: the ceiling is a\n * property of an organization, so an operator is outside it rather than\n * refused by it.\n */\n entitled?: boolean;\n}\n\nexport interface GuardedNavSection {\n title?: string;\n items: GuardedNavItem[];\n /**\n * What shape these screens are — the top tier of the sidebar, above the\n * domain.\n *\n * Every contributing shell declares its own, because this interface is the\n * only thing a shell and the host application both reach: adding the\n * tier is not an edit in the host.\n *\n * **Optional, and narrowly so.** A section with no type is not a fifth\n * category, it is a section that is not a screen group at all — the account\n * surface is the one case, and it carries no permission for the same reason.\n * A second untyped section appearing without a written reason means the\n * taxonomy is missing a case.\n */\n type?: ScreenType;\n}\n"],"names":[],"mappings":"AA4DA,WAkBC"}
1
+ {"version":3,"sources":["../../src/values/guarded-nav.ts"],"sourcesContent":["import type { Permission } from './permission.js';\nimport type { ScreenType } from './screen-type.js';\n\n/**\n * A navigation destination plus the permission it requires, if any.\n *\n * This is the permission-annotated half of navigation, which is why it lives with\n * the authorization vocabulary rather than in a shell: an entry and the route\n * behind it must be expressed in the same terms an endpoint's `guard` enforces, and\n * `can` — the filter every layer applies — is declared right next to it.\n *\n * It is also the one package both a shell and the host application depend on.\n * That matters because a shell contributes its own nav\n * fragment to whichever host mounts it, and shells may not depend on each other.\n *\n * `label`/`title` are **namespace-qualified catalog keys**, not copy. Whoever\n * renders the list does not necessarily own its wording, so the namespace travels\n * with the key — and spelling it out is also what makes an `app:` key visible to\n * the lint rule that keeps those keys inside `apps/`.\n *\n * Filtering on these is **presentation only**. Hiding an entry protects nothing;\n * the service is what refuses the request.\n */\nexport interface GuardedNavItem {\n label: string;\n href: string;\n icon?: string;\n /**\n * When set, the item also offers \"Open in workspace\" — a link to\n * `/workspace?tab=<workspace>`.\n */\n workspace?: string;\n /** Omit to show the item to every signed-in user. */\n permission?: Permission;\n /**\n * Also gate this item on the acting organization's provisioning — the second\n * ceiling, beside the role — using the domain segment of its own {@link permission}.\n *\n * A boolean rather than a domain name, because the domain is already written\n * one line up: a second string here could disagree with the permission the\n * route behind it actually checks, which is the drift this whole interface\n * exists to prevent.\n *\n * **Omitted is the right answer for most items.** An organization is not\n * \"provisioned for\" `catalog-reference`, `config` or `authn` — those are\n * operator-owned, and `catalog-reference` is explicitly never grantable\n *. Setting this on one of them would hide the platform's own\n * vocabulary from every vendor.\n *\n * Setting it without a `permission` is a declaration error and throws: there\n * would be no domain to read, and both possible defaults — always shown,\n * always hidden — read as a bug somewhere else entirely.\n *\n * A session with **no** organization ignores this flag: the ceiling is a\n * property of an organization, so an operator is outside it rather than\n * refused by it.\n */\n entitled?: boolean;\n}\n\nexport interface GuardedNavSection {\n title?: string;\n items: GuardedNavItem[];\n /**\n * What shape these screens are — the top tier of the sidebar, above the\n * domain.\n *\n * Every contributing shell declares its own, because this interface is the\n * only thing a shell and the host application both reach: adding the\n * tier is not an edit in the host.\n *\n * **Optional, and narrowly so.** A section with no type is not a fifth\n * category, it is a section that is not a screen group at all — the account\n * surface is the one case, and it carries no permission for the same reason.\n * A second untyped section appearing without a written reason means the\n * taxonomy is missing a case.\n */\n type?: ScreenType;\n}\n"],"names":[],"mappings":"AA4DA,WAkBC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@entifix/authz",
3
- "version": "0.13.0",
3
+ "version": "0.15.0",
4
4
  "description": "Authorization vocabulary: permissions derived from entities, roles, a grant table, and a PolicyDecision port.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -51,12 +51,12 @@
51
51
  },
52
52
  "dependencies": {
53
53
  "@swc/helpers": "0.5.23",
54
- "@entifix/core": "0.13.0"
54
+ "@entifix/core": "0.15.0"
55
55
  },
56
56
  "peerDependencies": {
57
- "effect": "^4.0.6"
57
+ "effect": "^4.0.7"
58
58
  },
59
59
  "devDependencies": {
60
- "effect": "4.0.6"
60
+ "effect": "4.0.7"
61
61
  }
62
62
  }