@cedarjs/cli 8.0.0-canary.3568 → 8.0.0-canary.3570
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/dist/commands/setup/tenancy/permissionsPackage.js +1 -1
- package/dist/commands/setup/tenancy/templates/permissionsPackage.index.ts.template +2 -2
- package/dist/commands/setup/tenancy/templates/tenancy.tsx.template +2 -2
- package/dist/commands/setup/tenancy/tenancyHandler.js +3 -3
- package/package.json +13 -13
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { definePermissions } from '@cedarjs/
|
|
2
|
-
import type { PermissionName } from '@cedarjs/
|
|
1
|
+
import { definePermissions } from '@cedarjs/permissions'
|
|
2
|
+
import type { PermissionName } from '@cedarjs/permissions'
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Every permission the app checks, and what each role may do: a role is a
|
|
@@ -16,10 +16,10 @@ import { createTenancy } from '@cedarjs/tenancy/web'
|
|
|
16
16
|
*
|
|
17
17
|
* A user who isn't signed in is sent to log in, and one who isn't a member
|
|
18
18
|
* of the organization sees `notAMember`. Pages only some members may open
|
|
19
|
-
* take `
|
|
19
|
+
* take a `permission` (see packages/permissions), and the one a member
|
|
20
20
|
* without it is sent to is `unauthorized`:
|
|
21
21
|
*
|
|
22
|
-
* <PrivateSet unauthenticated="login" unauthorized="projects"
|
|
22
|
+
* <PrivateSet unauthenticated="login" unauthorized="projects" permission="members.manage">
|
|
23
23
|
* <Route path="/org/{orgSlug}/members" page={MembersPage} name="members" />
|
|
24
24
|
* </PrivateSet>
|
|
25
25
|
*
|
|
@@ -514,11 +514,11 @@ ${ctx.routerNeedsTenancy ? `
|
|
|
514
514
|
what the user's role there may do.
|
|
515
515
|
7. Roles are the user's own: ${c.highlight("hasRole")} and ${c.highlight("<PrivateSet roles>")}
|
|
516
516
|
check ${c.highlight("currentUser.roles")}. In an organization, check a
|
|
517
|
-
permission instead: guard routes with ${c.highlight("<PrivateSet
|
|
518
|
-
|
|
517
|
+
permission instead: guard routes with ${c.highlight("<PrivateSet permission>")},
|
|
518
|
+
which checks their membership in the route's organization.
|
|
519
519
|
A member who lacks it is sent to ${c.highlight("unauthorized")}:
|
|
520
520
|
|
|
521
|
-
<PrivateSet unauthenticated="login" unauthorized="projects"
|
|
521
|
+
<PrivateSet unauthenticated="login" unauthorized="projects" permission="organization.manage">
|
|
522
522
|
<Route path="/org/{orgSlug}/settings" page={SettingsPage} name="settings" />
|
|
523
523
|
</PrivateSet>
|
|
524
524
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/cli",
|
|
3
|
-
"version": "8.0.0-canary.
|
|
3
|
+
"version": "8.0.0-canary.3570",
|
|
4
4
|
"description": "The CedarJS Command Line",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,17 +36,17 @@
|
|
|
36
36
|
"@babel/preset-typescript": "7.29.7",
|
|
37
37
|
"@babel/traverse": "7.29.10",
|
|
38
38
|
"@babel/types": "7.29.11",
|
|
39
|
-
"@cedarjs/api-server": "8.0.0-canary.
|
|
40
|
-
"@cedarjs/babel-config": "8.0.0-canary.
|
|
41
|
-
"@cedarjs/cli-helpers": "8.0.0-canary.
|
|
42
|
-
"@cedarjs/internal": "8.0.0-canary.
|
|
43
|
-
"@cedarjs/prerender": "8.0.0-canary.
|
|
44
|
-
"@cedarjs/project-config": "8.0.0-canary.
|
|
45
|
-
"@cedarjs/structure": "8.0.0-canary.
|
|
46
|
-
"@cedarjs/telemetry": "8.0.0-canary.
|
|
47
|
-
"@cedarjs/utils": "8.0.0-canary.
|
|
48
|
-
"@cedarjs/vite": "8.0.0-canary.
|
|
49
|
-
"@cedarjs/web-server": "8.0.0-canary.
|
|
39
|
+
"@cedarjs/api-server": "8.0.0-canary.3570",
|
|
40
|
+
"@cedarjs/babel-config": "8.0.0-canary.3570",
|
|
41
|
+
"@cedarjs/cli-helpers": "8.0.0-canary.3570",
|
|
42
|
+
"@cedarjs/internal": "8.0.0-canary.3570",
|
|
43
|
+
"@cedarjs/prerender": "8.0.0-canary.3570",
|
|
44
|
+
"@cedarjs/project-config": "8.0.0-canary.3570",
|
|
45
|
+
"@cedarjs/structure": "8.0.0-canary.3570",
|
|
46
|
+
"@cedarjs/telemetry": "8.0.0-canary.3570",
|
|
47
|
+
"@cedarjs/utils": "8.0.0-canary.3570",
|
|
48
|
+
"@cedarjs/vite": "8.0.0-canary.3570",
|
|
49
|
+
"@cedarjs/web-server": "8.0.0-canary.3570",
|
|
50
50
|
"@listr2/prompt-adapter-enquirer": "4.4.3",
|
|
51
51
|
"@opentelemetry/api": "1.9.1",
|
|
52
52
|
"@opentelemetry/core": "2.12.0",
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
"yargs": "18.2.0"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
|
-
"@cedarjs/framework-tools": "8.0.0-canary.
|
|
96
|
+
"@cedarjs/framework-tools": "8.0.0-canary.3570",
|
|
97
97
|
"@prisma/dmmf": "7.10.1",
|
|
98
98
|
"@types/archiver": "^7.0.0",
|
|
99
99
|
"memfs": "4.80.0",
|