@coolms/core-angular 2.0.0-alpha.4 → 2.0.0-alpha.6

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
@@ -9,6 +9,94 @@ currently serves. Earlier alphas are deliberately not reconstructed: entries are
9
9
  in the same commit as the work they describe, and inventing the ones that
10
10
  predate this file would be a worse record than not having them.
11
11
 
12
+ ### Changed
13
+
14
+ - **A person's refused write opens the elevation prompt, and is sent again
15
+ once they elevate.** A write refused for want of elevation (a stamped 403)
16
+ holds the request and opens the prompt above whatever the person is in. An
17
+ edit dialog stays open beneath it, with its input. On a grant, the write is
18
+ sent once more and the caller receives that answer. If the session is
19
+ already elevated, it is sent once more without asking. A decline tells
20
+ `ELEVATION_NOTICE`, naming the action, and hands back the 403. The repeat
21
+ passes no prompt a second time. Reads and background requests still open
22
+ nothing.
23
+
24
+ ## 2.0.0-alpha.6 - 2026-10-22
25
+
26
+ ### Changed
27
+
28
+ - **Breaking: `engines.node` names exactly the Node lines CI runs.** It moves from
29
+ `^22.22.3 || ^24.15.0 || >=26` to `^22.22.3 || ^24.15.0 || ^26.0.0`: Node 27
30
+ and later are not declared until CI runs them. Within each line the floor is
31
+ the highest one any package in the lockfile declares. CI checks both, from
32
+ the matrix and the lockfile. The published code does not change.
33
+
34
+ ### Added
35
+
36
+ - **`ELEVATION_ACTION`, `ElevationService.canPrompt` and `apiBase`.** A caller
37
+ can name a write in the person's words ("Saving the menu entry") for the
38
+ elevation prompt and notice. `ElevationPromptRequest.action` and the notice's
39
+ optional second argument carry it. Without it, the action is the method's
40
+ verb and the resource the URL names ("Saving navi nodes").
41
+
42
+ - **Navigation nodes carry the server's access state.** `NaviGraphNodeFlat.access`
43
+ is `'allowed'` or `'elevate'`. `'elevate'` marks a node that a member of admin
44
+ can open once the session is elevated; the admin shows it with a lock instead
45
+ of hiding it. A server that does not send the field is read as `'allowed'`
46
+ (`naviAccessOf`), so nothing changes against it.
47
+ - `NaviGraphService.loadAdminNav(url, { fresh: true })` asks the server again
48
+ instead of answering from the per-URL cache: the answer differs before and
49
+ after a grant, so a change of elevation must re-ask.
50
+ - **`ElevationState.mayElevate`** and `ElevationService.mayElevate()`: whether
51
+ this account may elevate at all, as the server answered it. Absent reads as
52
+ false.
53
+
54
+ ## 2.0.0-alpha.5 - 2026-10-09
55
+
56
+ ### Changed
57
+
58
+ - **The elevation prompt opens only when a person asks for it.** A 403 that
59
+ the server stamps `X-Elevation-Required` no longer opens the prompt by
60
+ itself. `elevationInterceptor` now:
61
+ - leaves a refused read (`GET`, `HEAD`, `OPTIONS`: a page loading, a poll)
62
+ to its caller, which shows its own state;
63
+ - leaves a refused background request alone (see `BACKGROUND_REQUEST`);
64
+ - tells `ELEVATION_NOTICE` when a write a person made is refused, and hands
65
+ the 403 back at once. The application shows the refusal with an Elevate
66
+ button, and only that click opens the prompt (`ElevationService.offerFor`).
67
+ The refused action is not repeated by itself.
68
+ - `ErrorHandlerService.humanize()` says "This needs an elevated session." for
69
+ a stamped refusal, and "You don't have access to this." in place of the
70
+ framework's bare "Access Denied." for any other 403. A sentence the server
71
+ wrote for the refused action is kept.
72
+ - `ConfigService` no longer caches a failed read, so a page that was refused
73
+ reads again after the person elevates.
74
+ - **The console opens for an account the server grants it to.** Once the
75
+ session is settled, the auth guard asks for the admin's endpoint map: a 200
76
+ merges it into the app config, and a 403 signs this sign-in out (on the
77
+ server too) and returns to the sign-in page, which says the account has no
78
+ access to the console. A failure to ask is not an answer: the console opens,
79
+ and each of its requests is still decided by the server.
80
+ - The map is read at `/api/v1/admin/manifest`, and at the older
81
+ `/api/v1/console/manifest` only when the server answers 404 there.
82
+ - An answer is kept only for the sign-in that asked. Nothing is asked while
83
+ nobody is signed in.
84
+ - A module route waits for the map when someone is signed in.
85
+ - The realtime connection opens after this check, and a refused sign-in
86
+ opens none.
87
+ - The sign-in page shows its answer (a wrong password, or the console's
88
+ refusal) as soon as it arrives, without waiting for the person to type.
89
+
90
+ ### Added
91
+
92
+ - `BACKGROUND_REQUEST`: an `HttpContextToken` marking a request no person
93
+ made. The realtime connection and subscription tokens and the preferences
94
+ sync carry it.
95
+ - `ELEVATION_NOTICE` and `ElevationNoticePort`: how an application is told
96
+ that a person's write was refused for want of elevation.
97
+ - `isElevationRefusal(err)`: the one test for a stamped 403.
98
+ - `ConsoleAccessService` in the public API.
99
+
12
100
  ## 2.0.0-alpha.4 - 2026-09-27
13
101
 
14
102
  ### Changed
package/README.md CHANGED
@@ -56,6 +56,10 @@ a relative symlink to the admin application's, so exactly one `@angular` tree is
56
56
  in play while the admin consumes this package from source: a second copy would
57
57
  give two type identities for the same class.
58
58
 
59
+ ## Tests
60
+
61
+ This package has no test runner of its own, so CI finds no tests in it: only typecheck, lint and build guard it here, and a check of "the same number of tests before and after" proves nothing for it. Its 13 spec files run in the admin suite of [coolms/theme-admin](https://github.com/coolms/theme-admin), which compiles this package from source. A change here is tested there, not by this repository's CI.
62
+
59
63
  ## Status
60
64
 
61
65
  A pre-release: the shape is still moving and it carries no compatibility