@jskit-ai/users-core 0.2.72 → 0.2.73

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/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The account settings, profile, avatar, security, preferences and notifications routes name the action they run (`actionId`), so each action's checks come before the route validates what the request sends, and before the avatar upload route reads its file (#497).
5
6
  - The manifest marks `runtime.database`, which its migrations need and no server provider of the package requires, as install-time only (`jskit.capabilities.installRequires`), so an app's start-up no longer logs "Package manifest requires a capability its providers do not." for it.
6
7
  - Profile synchronization passes the sign-in's `invitation` on: `syncIdentityProfile(profile, { invitation })` gives it to every `afterIdentityProfileSynced` lifecycle contributor beside `profile`, `created` and `options` (null when the sign-in carries none), and keeps it out of the transaction's options, so provisioning can tell an account made from an invitation.
7
8
  - `users_core_generic_initial-collation`, a migration Knex runs just before `users_core_generic_initial` (run `npm run db:migrate`): on MySQL and MariaDB it creates `users` and `user_settings`, where they do not exist yet, in the collation of the existing tables (`users`, then `auth_local_users`) rather than the database's default, and converts one recorded in another collation when no character can be lost. It changes nothing where they match.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/users-core",
3
- "version": "0.2.72",
3
+ "version": "0.2.73",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "jskit test"
@@ -19,10 +19,10 @@
19
19
  "./locales/en.json": "./locales/en.json"
20
20
  },
21
21
  "dependencies": {
22
- "@jskit-ai/resource-core": "0.1.226",
23
- "@jskit-ai/resource-crud-core": "0.1.228",
24
- "@jskit-ai/storage-runtime": "0.1.281",
25
- "@jskit-ai/uploads-runtime": "0.2.35",
22
+ "@jskit-ai/resource-core": "0.1.227",
23
+ "@jskit-ai/resource-crud-core": "0.1.229",
24
+ "@jskit-ai/storage-runtime": "0.1.282",
25
+ "@jskit-ai/uploads-runtime": "0.2.36",
26
26
  "json-rest-schema": "^1.0.20"
27
27
  },
28
28
  "description": "Users/account runtime plus HTTP routes for account features.",
@@ -204,10 +204,10 @@
204
204
  }
205
205
  },
206
206
  "peerDependencies": {
207
- "@jskit-ai/auth-core": "0.2.40",
208
- "@jskit-ai/database-runtime": "0.1.292",
209
- "@jskit-ai/http-runtime": "0.2.36",
210
- "@jskit-ai/kernel": "0.2.35",
211
- "@jskit-ai/resource-runtime": "0.2.57"
207
+ "@jskit-ai/auth-core": "0.2.41",
208
+ "@jskit-ai/database-runtime": "0.1.293",
209
+ "@jskit-ai/http-runtime": "0.2.37",
210
+ "@jskit-ai/kernel": "0.2.36",
211
+ "@jskit-ai/resource-runtime": "0.2.58"
212
212
  }
213
213
  }
@@ -10,9 +10,9 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.61",
14
- "@jskit-ai/resource-crud-core": "0.1.228",
15
- "@jskit-ai/users-core": "0.2.72"
13
+ "@jskit-ai/crud-core": "0.2.62",
14
+ "@jskit-ai/resource-crud-core": "0.1.229",
15
+ "@jskit-ai/users-core": "0.2.73"
16
16
  },
17
17
  "jskit": {
18
18
  "kind": "runtime",
@@ -10,14 +10,14 @@
10
10
  "./shared": "./src/shared/index.js"
11
11
  },
12
12
  "dependencies": {
13
- "@jskit-ai/crud-core": "0.2.61",
14
- "@jskit-ai/resource-crud-core": "0.1.228",
15
- "@jskit-ai/users-core": "0.2.72",
16
- "@jskit-ai/workspaces-core": "0.2.72"
13
+ "@jskit-ai/crud-core": "0.2.62",
14
+ "@jskit-ai/resource-crud-core": "0.1.229",
15
+ "@jskit-ai/users-core": "0.2.73",
16
+ "@jskit-ai/workspaces-core": "0.2.73"
17
17
  },
18
18
  "peerDependencies": {
19
- "@jskit-ai/kernel": "0.2.35",
20
- "@jskit-ai/resource-runtime": "0.2.57"
19
+ "@jskit-ai/kernel": "0.2.36",
20
+ "@jskit-ai/resource-runtime": "0.2.58"
21
21
  },
22
22
  "jskit": {
23
23
  "kind": "runtime",
@@ -9,6 +9,7 @@ function registerAccountNotificationsRoutes(router) {
9
9
  "/api/settings/notifications",
10
10
  {
11
11
  auth: "required",
12
+ actionId: "settings.notifications.update",
12
13
  meta: {
13
14
  tags: ["settings"],
14
15
  summary: "Update notification settings"
@@ -9,6 +9,7 @@ function registerAccountPreferencesRoutes(router) {
9
9
  "/api/settings/preferences",
10
10
  {
11
11
  auth: "required",
12
+ actionId: "settings.preferences.update",
12
13
  meta: {
13
14
  tags: ["settings"],
14
15
  summary: "Update user preferences"
@@ -27,6 +27,7 @@ function registerAccountProfileRoutes(router, { accountProfileService, authServi
27
27
  "/api/settings",
28
28
  {
29
29
  auth: "required",
30
+ actionId: "settings.read",
30
31
  meta: {
31
32
  tags: ["settings"],
32
33
  summary: "Get authenticated user's settings"
@@ -48,6 +49,7 @@ function registerAccountProfileRoutes(router, { accountProfileService, authServi
48
49
  "/api/settings/profile",
49
50
  {
50
51
  auth: "required",
52
+ actionId: "settings.profile.update",
51
53
  meta: {
52
54
  tags: ["settings"],
53
55
  summary: "Update profile settings"
@@ -98,6 +100,7 @@ function registerAccountProfileRoutes(router, { accountProfileService, authServi
98
100
  "/api/settings/profile/avatar",
99
101
  {
100
102
  auth: "required",
103
+ actionId: "settings.profile.avatar.upload",
101
104
  meta: {
102
105
  tags: ["settings"],
103
106
  summary: "Upload profile avatar",
@@ -146,6 +149,7 @@ function registerAccountProfileRoutes(router, { accountProfileService, authServi
146
149
  "/api/settings/profile/avatar",
147
150
  {
148
151
  auth: "required",
152
+ actionId: "settings.profile.avatar.delete",
149
153
  meta: {
150
154
  tags: ["settings"],
151
155
  summary: "Delete profile avatar and fallback to gravatar"
@@ -36,6 +36,7 @@ function registerAccountSecurityRoutes(router, { authService }) {
36
36
  "/api/settings/security/change-password",
37
37
  {
38
38
  auth: "required",
39
+ actionId: "settings.security.password.change",
39
40
  meta: {
40
41
  tags: ["settings"],
41
42
  summary: "Set or change authenticated user's password"
@@ -71,6 +72,7 @@ function registerAccountSecurityRoutes(router, { authService }) {
71
72
  "/api/settings/security/methods/password",
72
73
  {
73
74
  auth: "required",
75
+ actionId: "settings.security.password_method.toggle",
74
76
  meta: {
75
77
  tags: ["settings"],
76
78
  summary: "Enable or disable password sign-in method"
@@ -104,6 +106,7 @@ function registerAccountSecurityRoutes(router, { authService }) {
104
106
  "/api/settings/security/oauth/:provider/start",
105
107
  {
106
108
  auth: "required",
109
+ actionId: "settings.security.oauth.link.start",
107
110
  csrfProtection: false,
108
111
  meta: {
109
112
  tags: ["settings"],
@@ -146,6 +149,7 @@ function registerAccountSecurityRoutes(router, { authService }) {
146
149
  "/api/settings/security/oauth/:provider",
147
150
  {
148
151
  auth: "required",
152
+ actionId: "settings.security.oauth.unlink",
149
153
  meta: {
150
154
  tags: ["settings"],
151
155
  summary: "Unlink an OAuth provider from authenticated account"
@@ -180,6 +184,7 @@ function registerAccountSecurityRoutes(router, { authService }) {
180
184
  "/api/settings/security/logout-others",
181
185
  {
182
186
  auth: "required",
187
+ actionId: "settings.security.sessions.logout_others",
183
188
  meta: {
184
189
  tags: ["settings"],
185
190
  summary: "Sign out from other active sessions"