@nymphjs/tilmeld 1.0.0-beta.121 → 1.0.0-beta.123

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.
Files changed (40) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +6 -3
  3. package/dist/Group.d.ts +9 -9
  4. package/dist/Group.js +790 -793
  5. package/dist/Group.js.map +1 -1
  6. package/dist/Group.testArtifacts.js +3 -3
  7. package/dist/Group.testArtifacts.js.map +1 -1
  8. package/dist/Tilmeld.js +6 -15
  9. package/dist/Tilmeld.js.map +1 -1
  10. package/dist/User.d.ts +8 -9
  11. package/dist/User.js +1838 -1957
  12. package/dist/User.js.map +1 -1
  13. package/dist/User.testArtifacts.js +7 -7
  14. package/dist/User.testArtifacts.js.map +1 -1
  15. package/dist/decorators/index.d.ts +2 -0
  16. package/dist/decorators/index.js +3 -0
  17. package/dist/decorators/index.js.map +1 -0
  18. package/dist/decorators/requireAbility.d.ts +10 -0
  19. package/dist/decorators/requireAbility.js +21 -0
  20. package/dist/decorators/requireAbility.js.map +1 -0
  21. package/dist/decorators/requireAuthentication.d.ts +8 -0
  22. package/dist/decorators/requireAuthentication.js +16 -0
  23. package/dist/decorators/requireAuthentication.js.map +1 -0
  24. package/dist/index.d.ts +1 -0
  25. package/dist/index.js +1 -0
  26. package/dist/index.js.map +1 -1
  27. package/dist/testArtifacts.d.ts +5 -1
  28. package/dist/testArtifacts.js +211 -67
  29. package/dist/testArtifacts.js.map +1 -1
  30. package/package.json +13 -7
  31. package/src/Group.testArtifacts.ts +3 -3
  32. package/src/Group.ts +108 -158
  33. package/src/Tilmeld.ts +6 -35
  34. package/src/User.testArtifacts.ts +7 -7
  35. package/src/User.ts +364 -515
  36. package/src/decorators/index.ts +2 -0
  37. package/src/decorators/requireAbility.ts +26 -0
  38. package/src/decorators/requireAuthentication.ts +19 -0
  39. package/src/index.ts +1 -0
  40. package/src/testArtifacts.ts +165 -46
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.0.0-beta.123](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.122...v1.0.0-beta.123) (2026-09-23)
7
+
8
+ ### Bug Fixes
9
+
10
+ - additional security check, delete disabled descendant groups on delete, clean up ([ee9a287](https://forge.sciactive.com/sciactive/nymphjs/commits/ee9a287a3b89f21ca0ab501df22243f07b1af167))
11
+
12
+ ### Features
13
+
14
+ - use transaction helper and transactional decorator in tilmeld entities ([3f1e6eb](https://forge.sciactive.com/sciactive/nymphjs/commits/3f1e6eb12e44b79db243fb68b6a9563d177e9b47))
15
+
16
+ # [1.0.0-beta.122](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.121...v1.0.0-beta.122) (2026-09-22)
17
+
18
+ ### Bug Fixes
19
+
20
+ - issues causing failing tests and update other tests ([f249bb9](https://forge.sciactive.com/sciactive/nymphjs/commits/f249bb97cfd9edb5559c11c2c1e6c1c8a07af7d8))
21
+
22
+ ### Features
23
+
24
+ - add generic setNymph on Entity class ([eec2120](https://forge.sciactive.com/sciactive/nymphjs/commits/eec21203a636d18533a9e5e8a46a5765a73d2720))
25
+ - auth and ability decorators, finish tests for decorators and helpers ([dc48712](https://forge.sciactive.com/sciactive/nymphjs/commits/dc48712d4470d3aeadbd59befbc170d7ccce9cdf))
26
+ - save and delete now throw on errors instead of returning false, refresh throws on db errors ([536db88](https://forge.sciactive.com/sciactive/nymphjs/commits/536db8804ac515cd3e1e9c30b104f674e267916a))
27
+
6
28
  # [1.0.0-beta.121](https://forge.sciactive.com/sciactive/nymphjs/compare/v1.0.0-beta.120...v1.0.0-beta.121) (2026-09-17)
7
29
 
8
30
  ### Bug Fixes
package/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # Tilmeld - User/Group System for Nymph
2
2
 
3
- Powerful object data storage and querying.
3
+ Application Data and Access Framework for Node.js and the browser.
4
4
 
5
- Tilmeld (the d is silent) is a user and group management system for Nymph. It provides strict access controls to protect entities from unauthorized access/modification. It allows for granting and revoking ad hoc abilities to users and groups, then checking for those abilities. It provides authentication services and features protection against XSRF attacks.
5
+ https://nymph.io/
6
+
7
+ Tilmeld (the d is silent) is a user and group management, access control, and authentication system for Nymph. It allows creation and management of users and groups, including the ability to manage multiple domains. It provides strict access controls to protect entities from unauthorized access/modification. It allows for granting and revoking ad hoc abilities to users and groups, then checking for those abilities. It provides authentication services and features protection against XSRF attacks.
6
8
 
7
9
  ## Installation
8
10
 
@@ -56,6 +58,7 @@ There are a few abilities that Tilmeld uses internally:
56
58
  - `system/admin` - A user with this ability has **all** abilities.
57
59
  - `tilmeld/admin` - Allow the user to manage and edit other user's account and group information and grant/revoke abilities.
58
60
  - `tilmeld/switch` - Allow the user to switch to other users (log in as them without their password).
61
+ - `tilmeld/domain/[domain]/admin` - Allow a user to create and edit users in a domain.
59
62
  - `uid/get/[name]` - Allow the user to read the named UID.
60
63
  - `uid/new/[name]` - Allow the user to read, create, and increment the named UID.
61
64
  - `uid/set/[name]` - Allow the user to read, create, increment, set, and delete the named UID.
@@ -64,7 +67,7 @@ The admin and switch abilities cannot be inherited from groups.
64
67
 
65
68
  # License
66
69
 
67
- Copyright 2021-2025 SciActive Inc
70
+ Copyright 2021-2026 SciActive Inc
68
71
 
69
72
  Licensed under the Apache License, Version 2.0 (the "License");
70
73
  you may not use this file except in compliance with the License.
package/dist/Group.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Nymph, EntityData, EntityJson, EntityPatch, Options, Selector, SerializedEntityData } from '@nymphjs/nymph';
1
+ import { type EntityData, type EntityJson, type EntityPatch, type Options, type Selector, type SerializedEntityData } from '@nymphjs/nymph';
2
2
  import AbleObject from './AbleObject.js';
3
3
  import UserClass from './User.js';
4
4
  import type { UserData } from './User.js';
@@ -147,7 +147,6 @@ export default class Group extends AbleObject<GroupData> {
147
147
  static getSecondaryGroups(options?: Options, selectors?: Selector[]): Promise<(Group & GroupData)[]>;
148
148
  private static getAssignableGroups;
149
149
  constructor();
150
- $setNymph(nymph: Nymph): void;
151
150
  $getUniques(): Promise<string[]>;
152
151
  $getAvatar(): string;
153
152
  $jsonAcceptData(input: EntityJson, allowConflict?: boolean): void;
@@ -161,7 +160,7 @@ export default class Group extends AbleObject<GroupData> {
161
160
  */
162
161
  $updateDataProtection(givenUser?: UserClass & UserData): void;
163
162
  /**
164
- * Check whether the group is a descendant of a group.
163
+ * Check whether the group is a descendant of the given group.
165
164
  *
166
165
  * @param group The group, or the group's GUID.
167
166
  * @returns True or false.
@@ -177,9 +176,10 @@ export default class Group extends AbleObject<GroupData> {
177
176
  * Gets an array of the group's descendant groups.
178
177
  *
179
178
  * @param andSelf Include this group in the returned array.
179
+ * @param andDisabled Include disabled groups.
180
180
  * @returns An array of groups.
181
181
  */
182
- $getDescendants(andSelf?: boolean): Promise<(Group & GroupData)[]>;
182
+ $getDescendants(andSelf?: boolean, andDisabled?: boolean): Promise<(Group & GroupData)[]>;
183
183
  /**
184
184
  * Get the number of parents the group has.
185
185
  *
@@ -193,7 +193,7 @@ export default class Group extends AbleObject<GroupData> {
193
193
  */
194
194
  $getLevel(): Promise<number>;
195
195
  /**
196
- * Gets an array of users in the group.
196
+ * Gets an array of enabled users in the group.
197
197
  *
198
198
  * @param descendants Include users in all descendant groups too.
199
199
  * @param limit The limit for the query.
@@ -219,11 +219,11 @@ export default class Group extends AbleObject<GroupData> {
219
219
  result: boolean;
220
220
  message: string;
221
221
  }>;
222
- $save(): Promise<boolean>;
223
- $saveSkipAC(): Promise<boolean>;
222
+ $save(): Promise<void>;
223
+ $saveSkipAC(): Promise<void>;
224
224
  $tilmeldSaveSkipAC(): boolean;
225
- $delete(): Promise<boolean>;
226
- $deleteSkipAC(): Promise<boolean>;
225
+ $delete(): Promise<void>;
226
+ $deleteSkipAC(): Promise<void>;
227
227
  $tilmeldDeleteSkipAC(): boolean;
228
228
  static on<T extends GroupEventType>(event: T, callback: T extends 'checkGroupname' ? TilmeldCheckGroupnameCallback : T extends 'beforeSave' ? TilmeldBeforeGroupSaveCallback : T extends 'afterSave' ? TilmeldAfterGroupSaveCallback : T extends 'beforeDelete' ? TilmeldBeforeGroupDeleteCallback : T extends 'afterDelete' ? TilmeldAfterGroupDeleteCallback : never): () => boolean;
229
229
  static off<T extends GroupEventType>(event: T, callback: T extends 'checkGroupname' ? TilmeldCheckGroupnameCallback : T extends 'beforeSave' ? TilmeldBeforeGroupSaveCallback : T extends 'afterSave' ? TilmeldAfterGroupSaveCallback : T extends 'beforeDelete' ? TilmeldBeforeGroupDeleteCallback : T extends 'afterDelete' ? TilmeldAfterGroupDeleteCallback : never): boolean;