@kalisio/kdk 2.5.2 → 2.5.3
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/core/client/components/input/KShapePicker.vue +4 -4
- package/coverage/core/api/application.js.html +344 -344
- package/coverage/core/api/authentication.js.html +79 -79
- package/coverage/core/api/db.js.html +167 -167
- package/coverage/core/api/hooks/hooks.authentication.js.html +12 -12
- package/coverage/core/api/hooks/hooks.authorisations.js.html +166 -163
- package/coverage/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/core/api/hooks/hooks.model.js.html +280 -268
- package/coverage/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/core/api/hooks/hooks.push.js.html +12 -12
- package/coverage/core/api/hooks/hooks.query.js.html +92 -92
- package/coverage/core/api/hooks/hooks.schemas.js.html +13 -13
- package/coverage/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/core/api/hooks/hooks.users.js.html +48 -48
- package/coverage/core/api/hooks/index.html +49 -49
- package/coverage/core/api/hooks/index.js.html +11 -11
- package/coverage/core/api/index.html +42 -42
- package/coverage/core/api/index.js.html +22 -22
- package/coverage/core/api/marshall.js.html +127 -127
- package/coverage/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/index.html +1 -1
- package/coverage/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/core/api/services/account/account.hooks.js.html +42 -42
- package/coverage/core/api/services/account/account.service.js.html +34 -34
- package/coverage/core/api/services/account/index.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +108 -120
- package/coverage/core/api/services/authorisations/index.html +19 -19
- package/coverage/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/core/api/services/databases/index.html +1 -1
- package/coverage/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/core/api/services/groups/index.html +1 -1
- package/coverage/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/core/api/services/import-export/index.html +1 -1
- package/coverage/core/api/services/index.html +15 -15
- package/coverage/core/api/services/index.js.html +97 -85
- package/coverage/core/api/services/mailer/index.html +1 -1
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/core/api/services/messages/index.html +5 -5
- package/coverage/core/api/services/messages/messages.hooks.js.html +11 -8
- package/coverage/core/api/services/organisations/index.html +1 -1
- package/coverage/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/core/api/services/push/index.html +1 -1
- package/coverage/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/core/api/services/push/push.service.js.html +1 -1
- package/coverage/core/api/services/storage/index.html +1 -1
- package/coverage/core/api/services/storage/storage.hooks.js.html +36 -36
- package/coverage/core/api/services/storage/storage.service.js.html +30 -30
- package/coverage/core/api/services/tags/index.html +1 -1
- package/coverage/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/core/api/services/users/index.html +7 -7
- package/coverage/core/api/services/users/users.hooks.js.html +83 -80
- package/coverage/core/api/services/users/users.service.js.html +4 -4
- package/coverage/core/api/utils.js.html +1 -1
- package/coverage/core/common/errors.js.html +2 -2
- package/coverage/core/common/index.html +30 -30
- package/coverage/core/common/index.js.html +11 -11
- package/coverage/core/common/permissions.js.html +187 -187
- package/coverage/core/common/schema.js.html +26 -26
- package/coverage/core/common/utils.js.html +61 -61
- package/coverage/core/common/utils.offline.js.html +6 -6
- package/coverage/index.html +179 -164
- package/coverage/lcov-report/core/api/application.js.html +344 -344
- package/coverage/lcov-report/core/api/authentication.js.html +79 -79
- package/coverage/lcov-report/core/api/db.js.html +167 -167
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +12 -12
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +166 -163
- package/coverage/lcov-report/core/api/hooks/hooks.groups.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +18 -18
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +280 -268
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +12 -12
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +92 -92
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +13 -13
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +28 -28
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +7 -7
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +48 -48
- package/coverage/lcov-report/core/api/hooks/index.html +49 -49
- package/coverage/lcov-report/core/api/hooks/index.js.html +11 -11
- package/coverage/lcov-report/core/api/index.html +42 -42
- package/coverage/lcov-report/core/api/index.js.html +22 -22
- package/coverage/lcov-report/core/api/marshall.js.html +127 -127
- package/coverage/lcov-report/core/api/models/groups.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/index.html +1 -1
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/organisations.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +11 -11
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +42 -42
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/account/index.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +34 -34
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +108 -120
- package/coverage/lcov-report/core/api/services/authorisations/index.html +19 -19
- package/coverage/lcov-report/core/api/services/databases/databases.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/databases.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/databases/index.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/groups.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/groups/index.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/import-export/index.html +1 -1
- package/coverage/lcov-report/core/api/services/index.html +15 -15
- package/coverage/lcov-report/core/api/services/index.js.html +97 -85
- package/coverage/lcov-report/core/api/services/mailer/index.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/messages/index.html +5 -5
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +11 -8
- package/coverage/lcov-report/core/api/services/organisations/index.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/index.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/index.html +1 -1
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +36 -36
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +30 -30
- package/coverage/lcov-report/core/api/services/tags/index.html +1 -1
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/users/index.html +7 -7
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +83 -80
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +4 -4
- package/coverage/lcov-report/core/api/utils.js.html +1 -1
- package/coverage/lcov-report/core/common/errors.js.html +2 -2
- package/coverage/lcov-report/core/common/index.html +30 -30
- package/coverage/lcov-report/core/common/index.js.html +11 -11
- package/coverage/lcov-report/core/common/permissions.js.html +187 -187
- package/coverage/lcov-report/core/common/schema.js.html +26 -26
- package/coverage/lcov-report/core/common/utils.js.html +61 -61
- package/coverage/lcov-report/core/common/utils.offline.js.html +6 -6
- package/coverage/lcov-report/index.html +179 -164
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +348 -258
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +795 -810
- package/coverage/lcov-report/map/api/hooks/index.html +54 -54
- package/coverage/lcov-report/map/api/hooks/index.js.html +16 -16
- package/coverage/lcov-report/map/api/index.html +32 -32
- package/coverage/lcov-report/map/api/index.js.html +46 -46
- package/coverage/lcov-report/map/api/marshall.js.html +72 -72
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +69 -27
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/lcov-report/map/api/models/index.html +69 -54
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/lcov-report/map/api/models/styles.model.mongodb.js.html +112 -0
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/lcov-report/map/api/services/alerts/index.html +32 -32
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +177 -162
- package/coverage/lcov-report/map/api/services/catalog/index.html +21 -21
- package/coverage/lcov-report/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/daptiles/index.html +1 -1
- package/coverage/lcov-report/map/api/services/features/features.hooks.js.html +160 -160
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +117 -117
- package/coverage/lcov-report/map/api/services/features/index.html +31 -31
- package/coverage/lcov-report/map/api/services/index.html +21 -21
- package/coverage/lcov-report/map/api/services/index.js.html +404 -296
- package/coverage/lcov-report/map/api/services/projects/index.html +21 -21
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/lcov-report/map/api/services/styles/index.html +116 -0
- package/coverage/lcov-report/map/api/services/styles/styles.hooks.js.html +196 -0
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/lcov-report/map/common/errors.js.html +16 -16
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +267 -267
- package/coverage/lcov-report/map/common/grid.js.html +554 -554
- package/coverage/lcov-report/map/common/index.html +158 -158
- package/coverage/lcov-report/map/common/index.js.html +68 -68
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/lcov-report/map/common/moment-utils.js.html +18 -18
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/lcov-report/map/common/opendap-utils.js.html +353 -353
- package/coverage/lcov-report/map/common/permissions.js.html +42 -36
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/lcov-report/map/common/tms-utils.js.html +6 -6
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/lcov-report/map/common/wcs-utils.js.html +339 -339
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/lcov-report/map/common/wfs-utils.js.html +11 -11
- package/coverage/lcov-report/map/common/wms-utils.js.html +8 -8
- package/coverage/lcov-report/map/common/wmts-utils.js.html +7 -7
- package/coverage/lcov.info +7022 -5894
- package/coverage/map/api/hooks/hooks.catalog.js.html +348 -258
- package/coverage/map/api/hooks/hooks.features.js.html +218 -218
- package/coverage/map/api/hooks/hooks.query.js.html +795 -810
- package/coverage/map/api/hooks/index.html +54 -54
- package/coverage/map/api/hooks/index.js.html +16 -16
- package/coverage/map/api/index.html +32 -32
- package/coverage/map/api/index.js.html +46 -46
- package/coverage/map/api/marshall.js.html +72 -72
- package/coverage/map/api/models/alerts.model.mongodb.js.html +24 -24
- package/coverage/map/api/models/catalog.model.mongodb.js.html +69 -27
- package/coverage/map/api/models/features.model.mongodb.js.html +80 -80
- package/coverage/map/api/models/index.html +69 -54
- package/coverage/map/api/models/projects.model.mongodb.js.html +26 -26
- package/coverage/map/api/models/styles.model.mongodb.js.html +112 -0
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +136 -136
- package/coverage/map/api/services/alerts/alerts.service.js.html +343 -343
- package/coverage/map/api/services/alerts/index.html +32 -32
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +177 -162
- package/coverage/map/api/services/catalog/index.html +21 -21
- package/coverage/map/api/services/daptiles/daptiles.service.js.html +1 -1
- package/coverage/map/api/services/daptiles/index.html +1 -1
- package/coverage/map/api/services/features/features.hooks.js.html +160 -160
- package/coverage/map/api/services/features/features.service.js.html +117 -117
- package/coverage/map/api/services/features/index.html +31 -31
- package/coverage/map/api/services/index.html +21 -21
- package/coverage/map/api/services/index.js.html +404 -296
- package/coverage/map/api/services/projects/index.html +21 -21
- package/coverage/map/api/services/projects/projects.hooks.js.html +237 -237
- package/coverage/map/api/services/styles/index.html +116 -0
- package/coverage/map/api/services/styles/styles.hooks.js.html +196 -0
- package/coverage/map/common/dynamic-grid-source.js.html +68 -68
- package/coverage/map/common/errors.js.html +16 -16
- package/coverage/map/common/geotiff-grid-source.js.html +267 -267
- package/coverage/map/common/grid.js.html +554 -554
- package/coverage/map/common/index.html +158 -158
- package/coverage/map/common/index.js.html +68 -68
- package/coverage/map/common/meteo-model-grid-source.js.html +73 -73
- package/coverage/map/common/moment-utils.js.html +18 -18
- package/coverage/map/common/opendap-grid-source.js.html +484 -484
- package/coverage/map/common/opendap-utils.js.html +353 -353
- package/coverage/map/common/permissions.js.html +42 -36
- package/coverage/map/common/time-based-grid-source.js.html +59 -59
- package/coverage/map/common/tms-utils.js.html +6 -6
- package/coverage/map/common/wcs-grid-source.js.html +190 -190
- package/coverage/map/common/wcs-utils.js.html +339 -339
- package/coverage/map/common/weacast-grid-source.js.html +345 -345
- package/coverage/map/common/wfs-utils.js.html +11 -11
- package/coverage/map/common/wms-utils.js.html +8 -8
- package/coverage/map/common/wmts-utils.js.html +7 -7
- package/coverage/tmp/coverage-151198-1753351220086-0.json +1 -0
- package/coverage/tmp/coverage-151210-1753351220070-0.json +1 -0
- package/coverage/tmp/coverage-151221-1753351129816-0.json +1 -0
- package/coverage/tmp/coverage-151233-1753351129803-0.json +1 -0
- package/coverage/tmp/coverage-151240-1753351129770-0.json +1 -0
- package/coverage/tmp/coverage-151307-1753351220058-0.json +1 -0
- package/coverage/tmp/coverage-151319-1753351220044-0.json +1 -0
- package/coverage/tmp/coverage-151326-1753351220010-0.json +1 -0
- package/map/api/services/styles/styles.hooks.js +1 -1
- package/map/client/components/KLayerEditor.vue +4 -0
- package/map/client/components/catalog/KLayerCategories.vue +2 -0
- package/map/client/components/stickies/KLevelSlider.vue +10 -8
- package/map/client/components/styles/KStyleEditor.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +7 -1
- package/map/client/composables/highlight.js +5 -1
- package/map/client/i18n/map_en.json +4 -1
- package/map/client/i18n/map_fr.json +4 -1
- package/map/client/mixins/globe/mixin.geojson-layers.js +11 -5
- package/map/client/mixins/mixin.activity.js +9 -0
- package/map/client/utils/utils.layers.js +0 -2
- package/package.json +1 -1
- package/test/api/core/push.test.js +1 -1
- package/test/api/core/test-log-2025-02-05.log +23 -0
- package/test/api/core/test-log-2025-05-21.log +15 -0
- package/test/api/core/test-log-2025-06-25.log +9 -0
- package/test/api/core/test-log-2025-07-24.log +44 -0
- package/test/api/map/test-log-2025-05-27.log +13 -0
- package/test/api/map/test-log-2025-06-23.log +7 -0
- package/test/api/map/{test-log-2025-05-26.log → test-log-2025-07-24.log} +3 -4
- package/coverage/tmp/coverage-122123-1739872365211-0.json +0 -1
- package/coverage/tmp/coverage-122135-1739872365196-0.json +0 -1
- package/coverage/tmp/coverage-122146-1739872365184-0.json +0 -1
- package/coverage/tmp/coverage-122158-1739872365169-0.json +0 -1
- package/coverage/tmp/coverage-122165-1739872365141-0.json +0 -1
- package/test/api/core/test-log-2025-05-26.log +0 -22
|
@@ -180,28 +180,28 @@
|
|
|
180
180
|
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
181
|
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
182
|
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
-
<a name='L118'></a><a href='#L118'>118</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">
|
|
184
|
-
<span class="cline-any cline-yes">
|
|
185
|
-
<span class="cline-any cline-yes">
|
|
186
|
-
<span class="cline-any cline-yes">
|
|
187
|
-
<span class="cline-any cline-yes">
|
|
188
|
-
<span class="cline-any cline-yes">
|
|
189
|
-
<span class="cline-any cline-yes">
|
|
190
|
-
<span class="cline-any cline-yes">
|
|
191
|
-
<span class="cline-any cline-yes">
|
|
192
|
-
<span class="cline-any cline-yes">
|
|
193
|
-
<span class="cline-any cline-yes">
|
|
194
|
-
<span class="cline-any cline-yes">
|
|
195
|
-
<span class="cline-any cline-yes">
|
|
196
|
-
<span class="cline-any cline-yes">1x</span>
|
|
197
|
-
<span class="cline-any cline-yes">1x</span>
|
|
198
|
-
<span class="cline-any cline-yes">1x</span>
|
|
183
|
+
<a name='L118'></a><a href='#L118'>118</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
184
|
+
<span class="cline-any cline-yes">2x</span>
|
|
185
|
+
<span class="cline-any cline-yes">2x</span>
|
|
186
|
+
<span class="cline-any cline-yes">2x</span>
|
|
187
|
+
<span class="cline-any cline-yes">2x</span>
|
|
188
|
+
<span class="cline-any cline-yes">2x</span>
|
|
189
|
+
<span class="cline-any cline-yes">2x</span>
|
|
190
|
+
<span class="cline-any cline-yes">2x</span>
|
|
191
|
+
<span class="cline-any cline-yes">2x</span>
|
|
192
|
+
<span class="cline-any cline-yes">2x</span>
|
|
193
|
+
<span class="cline-any cline-yes">2x</span>
|
|
194
|
+
<span class="cline-any cline-yes">2x</span>
|
|
195
|
+
<span class="cline-any cline-yes">2x</span>
|
|
199
196
|
<span class="cline-any cline-yes">1x</span>
|
|
200
197
|
<span class="cline-any cline-yes">1x</span>
|
|
201
198
|
<span class="cline-any cline-yes">1x</span>
|
|
202
199
|
<span class="cline-any cline-yes">1x</span>
|
|
203
|
-
<span class="cline-any cline-yes">
|
|
204
|
-
<span class="cline-any cline-yes">
|
|
200
|
+
<span class="cline-any cline-yes">2x</span>
|
|
201
|
+
<span class="cline-any cline-yes">2x</span>
|
|
202
|
+
<span class="cline-any cline-yes">2x</span>
|
|
203
|
+
<span class="cline-any cline-yes">11x</span>
|
|
204
|
+
<span class="cline-any cline-yes">11x</span>
|
|
205
205
|
<span class="cline-any cline-yes">7x</span>
|
|
206
206
|
<span class="cline-any cline-yes">7x</span>
|
|
207
207
|
<span class="cline-any cline-yes">7x</span>
|
|
@@ -282,21 +282,21 @@
|
|
|
282
282
|
<span class="cline-any cline-no"> </span>
|
|
283
283
|
<span class="cline-any cline-no"> </span>
|
|
284
284
|
<span class="cline-any cline-yes">7x</span>
|
|
285
|
-
<span class="cline-any cline-yes">
|
|
286
|
-
<span class="cline-any cline-yes">
|
|
287
|
-
<span class="cline-any cline-yes">
|
|
288
|
-
<span class="cline-any cline-yes">
|
|
289
|
-
<span class="cline-any cline-yes">
|
|
290
|
-
<span class="cline-any cline-yes">
|
|
291
|
-
<span class="cline-any cline-yes">
|
|
292
|
-
<span class="cline-any cline-yes">
|
|
293
|
-
<span class="cline-any cline-yes">
|
|
294
|
-
<span class="cline-any cline-yes">
|
|
295
|
-
<span class="cline-any cline-yes">
|
|
296
|
-
<span class="cline-any cline-yes">
|
|
297
|
-
<span class="cline-any cline-yes">
|
|
298
|
-
<span class="cline-any cline-yes">
|
|
299
|
-
<span class="cline-any cline-yes">
|
|
285
|
+
<span class="cline-any cline-yes">11x</span>
|
|
286
|
+
<span class="cline-any cline-yes">11x</span>
|
|
287
|
+
<span class="cline-any cline-yes">11x</span>
|
|
288
|
+
<span class="cline-any cline-yes">11x</span>
|
|
289
|
+
<span class="cline-any cline-yes">11x</span>
|
|
290
|
+
<span class="cline-any cline-yes">11x</span>
|
|
291
|
+
<span class="cline-any cline-yes">11x</span>
|
|
292
|
+
<span class="cline-any cline-yes">11x</span>
|
|
293
|
+
<span class="cline-any cline-yes">11x</span>
|
|
294
|
+
<span class="cline-any cline-yes">11x</span>
|
|
295
|
+
<span class="cline-any cline-yes">11x</span>
|
|
296
|
+
<span class="cline-any cline-yes">11x</span>
|
|
297
|
+
<span class="cline-any cline-yes">11x</span>
|
|
298
|
+
<span class="cline-any cline-yes">11x</span>
|
|
299
|
+
<span class="cline-any cline-yes">11x</span>
|
|
300
300
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { AuthenticationManagementService } from 'feathers-authentication-management'
|
|
301
301
|
import errors from '@feathersjs/errors'
|
|
302
302
|
import emails from 'email-templates'
|
|
@@ -421,7 +421,7 @@ export default function (name, app, options) {
|
|
|
421
421
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
422
422
|
Code coverage generated by
|
|
423
423
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
424
|
-
at 2025-
|
|
424
|
+
at 2025-07-24T10:00:20.476Z
|
|
425
425
|
</div>
|
|
426
426
|
<script src="../../../../prettify.js"></script>
|
|
427
427
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2025-
|
|
119
|
+
at 2025-07-24T10:00:20.476Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -96,39 +96,39 @@
|
|
|
96
96
|
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
97
|
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
98
|
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">
|
|
100
|
-
<span class="cline-any cline-yes">
|
|
101
|
-
<span class="cline-any cline-yes">
|
|
102
|
-
<span class="cline-any cline-yes">
|
|
103
|
-
<span class="cline-any cline-yes">
|
|
104
|
-
<span class="cline-any cline-yes">
|
|
105
|
-
<span class="cline-any cline-yes">
|
|
106
|
-
<span class="cline-any cline-yes">
|
|
107
|
-
<span class="cline-any cline-yes">
|
|
108
|
-
<span class="cline-any cline-yes">
|
|
109
|
-
<span class="cline-any cline-yes">
|
|
110
|
-
<span class="cline-any cline-yes">
|
|
111
|
-
<span class="cline-any cline-yes">
|
|
112
|
-
<span class="cline-any cline-yes">
|
|
113
|
-
<span class="cline-any cline-yes">
|
|
114
|
-
<span class="cline-any cline-yes">
|
|
115
|
-
<span class="cline-any cline-yes">
|
|
116
|
-
<span class="cline-any cline-yes">
|
|
117
|
-
<span class="cline-any cline-yes">
|
|
118
|
-
<span class="cline-any cline-yes">
|
|
119
|
-
<span class="cline-any cline-yes">
|
|
120
|
-
<span class="cline-any cline-yes">
|
|
121
|
-
<span class="cline-any cline-yes">
|
|
122
|
-
<span class="cline-any cline-yes">
|
|
123
|
-
<span class="cline-any cline-yes">
|
|
124
|
-
<span class="cline-any cline-yes">
|
|
125
|
-
<span class="cline-any cline-yes">
|
|
126
|
-
<span class="cline-any cline-yes">
|
|
127
|
-
<span class="cline-any cline-yes">
|
|
128
|
-
<span class="cline-any cline-yes">
|
|
129
|
-
<span class="cline-any cline-yes">
|
|
130
|
-
<span class="cline-any cline-yes">
|
|
131
|
-
<span class="cline-any cline-yes">
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
100
|
+
<span class="cline-any cline-yes">2x</span>
|
|
101
|
+
<span class="cline-any cline-yes">2x</span>
|
|
102
|
+
<span class="cline-any cline-yes">2x</span>
|
|
103
|
+
<span class="cline-any cline-yes">2x</span>
|
|
104
|
+
<span class="cline-any cline-yes">2x</span>
|
|
105
|
+
<span class="cline-any cline-yes">2x</span>
|
|
106
|
+
<span class="cline-any cline-yes">2x</span>
|
|
107
|
+
<span class="cline-any cline-yes">2x</span>
|
|
108
|
+
<span class="cline-any cline-yes">2x</span>
|
|
109
|
+
<span class="cline-any cline-yes">2x</span>
|
|
110
|
+
<span class="cline-any cline-yes">2x</span>
|
|
111
|
+
<span class="cline-any cline-yes">2x</span>
|
|
112
|
+
<span class="cline-any cline-yes">2x</span>
|
|
113
|
+
<span class="cline-any cline-yes">2x</span>
|
|
114
|
+
<span class="cline-any cline-yes">2x</span>
|
|
115
|
+
<span class="cline-any cline-yes">2x</span>
|
|
116
|
+
<span class="cline-any cline-yes">2x</span>
|
|
117
|
+
<span class="cline-any cline-yes">2x</span>
|
|
118
|
+
<span class="cline-any cline-yes">2x</span>
|
|
119
|
+
<span class="cline-any cline-yes">2x</span>
|
|
120
|
+
<span class="cline-any cline-yes">2x</span>
|
|
121
|
+
<span class="cline-any cline-yes">2x</span>
|
|
122
|
+
<span class="cline-any cline-yes">2x</span>
|
|
123
|
+
<span class="cline-any cline-yes">2x</span>
|
|
124
|
+
<span class="cline-any cline-yes">2x</span>
|
|
125
|
+
<span class="cline-any cline-yes">2x</span>
|
|
126
|
+
<span class="cline-any cline-yes">2x</span>
|
|
127
|
+
<span class="cline-any cline-yes">2x</span>
|
|
128
|
+
<span class="cline-any cline-yes">2x</span>
|
|
129
|
+
<span class="cline-any cline-yes">2x</span>
|
|
130
|
+
<span class="cline-any cline-yes">2x</span>
|
|
131
|
+
<span class="cline-any cline-yes">2x</span>
|
|
132
132
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { populateSubjects, populateResource } from '../../hooks/index.js'
|
|
133
133
|
|
|
134
134
|
export default {
|
|
@@ -169,7 +169,7 @@ export default {
|
|
|
169
169
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
170
170
|
Code coverage generated by
|
|
171
171
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
172
|
-
at 2025-
|
|
172
|
+
at 2025-07-24T10:00:20.476Z
|
|
173
173
|
</div>
|
|
174
174
|
<script src="../../../../prettify.js"></script>
|
|
175
175
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">93.79% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>136/
|
|
28
|
+
<span class='fraction'>136/145</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">79.48% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>31/39</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">93.79% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>136/
|
|
49
|
+
<span class='fraction'>136/145</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -208,25 +208,21 @@
|
|
|
208
208
|
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
209
|
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
210
|
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
-
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
-
<
|
|
213
|
-
<
|
|
214
|
-
<
|
|
215
|
-
<
|
|
216
|
-
<span class="cline-any cline-yes">
|
|
217
|
-
<span class="cline-any cline-yes">
|
|
218
|
-
<span class="cline-any cline-yes">
|
|
219
|
-
<span class="cline-any cline-yes">
|
|
220
|
-
<span class="cline-any cline-yes">
|
|
221
|
-
<span class="cline-any cline-yes">
|
|
222
|
-
<span class="cline-any cline-yes">
|
|
223
|
-
<span class="cline-any cline-yes">
|
|
224
|
-
<span class="cline-any cline-yes">
|
|
225
|
-
<span class="cline-any cline-yes">
|
|
226
|
-
<span class="cline-any cline-yes">1x</span>
|
|
227
|
-
<span class="cline-any cline-yes">1x</span>
|
|
228
|
-
<span class="cline-any cline-yes">1x</span>
|
|
229
|
-
<span class="cline-any cline-yes">1x</span>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">2x</span>
|
|
212
|
+
<span class="cline-any cline-yes">2x</span>
|
|
213
|
+
<span class="cline-any cline-yes">2x</span>
|
|
214
|
+
<span class="cline-any cline-yes">2x</span>
|
|
215
|
+
<span class="cline-any cline-yes">2x</span>
|
|
216
|
+
<span class="cline-any cline-yes">2x</span>
|
|
217
|
+
<span class="cline-any cline-yes">2x</span>
|
|
218
|
+
<span class="cline-any cline-yes">2x</span>
|
|
219
|
+
<span class="cline-any cline-yes">2x</span>
|
|
220
|
+
<span class="cline-any cline-yes">2x</span>
|
|
221
|
+
<span class="cline-any cline-yes">2x</span>
|
|
222
|
+
<span class="cline-any cline-yes">2x</span>
|
|
223
|
+
<span class="cline-any cline-yes">2x</span>
|
|
224
|
+
<span class="cline-any cline-yes">2x</span>
|
|
225
|
+
<span class="cline-any cline-yes">2x</span>
|
|
230
226
|
<span class="cline-any cline-yes">1x</span>
|
|
231
227
|
<span class="cline-any cline-yes">1x</span>
|
|
232
228
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -259,13 +255,12 @@
|
|
|
259
255
|
<span class="cline-any cline-yes">1x</span>
|
|
260
256
|
<span class="cline-any cline-yes">1x</span>
|
|
261
257
|
<span class="cline-any cline-yes">1x</span>
|
|
262
|
-
<span class="cline-any cline-yes">
|
|
263
|
-
<span class="cline-any cline-yes">
|
|
264
|
-
<span class="cline-any cline-yes">
|
|
265
|
-
<span class="cline-any cline-yes">
|
|
266
|
-
<span class="cline-any cline-yes">
|
|
267
|
-
<span class="cline-any cline-yes">
|
|
268
|
-
<span class="cline-any cline-yes">1x</span>
|
|
258
|
+
<span class="cline-any cline-yes">2x</span>
|
|
259
|
+
<span class="cline-any cline-yes">2x</span>
|
|
260
|
+
<span class="cline-any cline-yes">2x</span>
|
|
261
|
+
<span class="cline-any cline-yes">2x</span>
|
|
262
|
+
<span class="cline-any cline-yes">2x</span>
|
|
263
|
+
<span class="cline-any cline-yes">2x</span>
|
|
269
264
|
<span class="cline-any cline-yes">1x</span>
|
|
270
265
|
<span class="cline-any cline-yes">1x</span>
|
|
271
266
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -293,14 +288,13 @@
|
|
|
293
288
|
<span class="cline-any cline-yes">1x</span>
|
|
294
289
|
<span class="cline-any cline-yes">1x</span>
|
|
295
290
|
<span class="cline-any cline-yes">1x</span>
|
|
296
|
-
<span class="cline-any cline-yes">1x</span>
|
|
297
291
|
<span class="cline-any cline-no"> </span>
|
|
298
292
|
<span class="cline-any cline-yes">1x</span>
|
|
299
|
-
<span class="cline-any cline-yes">
|
|
300
|
-
<span class="cline-any cline-yes">
|
|
301
|
-
<span class="cline-any cline-yes">
|
|
302
|
-
<span class="cline-any cline-yes">
|
|
303
|
-
<span class="cline-any cline-yes">
|
|
293
|
+
<span class="cline-any cline-yes">2x</span>
|
|
294
|
+
<span class="cline-any cline-yes">2x</span>
|
|
295
|
+
<span class="cline-any cline-yes">2x</span>
|
|
296
|
+
<span class="cline-any cline-yes">10x</span>
|
|
297
|
+
<span class="cline-any cline-yes">10x</span>
|
|
304
298
|
<span class="cline-any cline-yes">6x</span>
|
|
305
299
|
<span class="cline-any cline-yes">6x</span>
|
|
306
300
|
<span class="cline-any cline-yes">6x</span>
|
|
@@ -309,58 +303,56 @@
|
|
|
309
303
|
<span class="cline-any cline-yes">6x</span>
|
|
310
304
|
<span class="cline-any cline-yes">6x</span>
|
|
311
305
|
<span class="cline-any cline-yes">6x</span>
|
|
312
|
-
<span class="cline-any cline-
|
|
313
|
-
<span class="cline-any cline-
|
|
314
|
-
<span class="cline-any cline-yes">1x</span>
|
|
315
|
-
<span class="cline-any cline-yes">1x</span>
|
|
316
|
-
<span class="cline-any cline-yes">1x</span>
|
|
317
|
-
<span class="cline-any cline-yes">1x</span>
|
|
318
|
-
<span class="cline-any cline-yes">1x</span>
|
|
319
|
-
<span class="cline-any cline-yes">11x</span>
|
|
320
|
-
<span class="cline-any cline-yes">11x</span>
|
|
306
|
+
<span class="cline-any cline-yes">10x</span>
|
|
307
|
+
<span class="cline-any cline-yes">4x</span>
|
|
321
308
|
<span class="cline-any cline-yes">4x</span>
|
|
322
|
-
<span class="cline-any cline-yes">11x</span>
|
|
323
|
-
<span class="cline-any cline-yes">7x</span>
|
|
324
|
-
<span class="cline-any cline-yes">7x</span>
|
|
325
|
-
<span class="cline-any cline-yes">11x</span>
|
|
326
|
-
<span class="cline-any cline-yes">9x</span>
|
|
327
|
-
<span class="cline-any cline-yes">9x</span>
|
|
328
|
-
<span class="cline-any cline-yes">9x</span>
|
|
329
|
-
<span class="cline-any cline-yes">9x</span>
|
|
330
|
-
<span class="cline-any cline-yes">9x</span>
|
|
331
|
-
<span class="cline-any cline-yes">3x</span>
|
|
332
|
-
<span class="cline-any cline-yes">9x</span>
|
|
333
|
-
<span class="cline-any cline-yes">6x</span>
|
|
334
|
-
<span class="cline-any cline-yes">6x</span>
|
|
335
|
-
<span class="cline-any cline-yes">9x</span>
|
|
336
|
-
<span class="cline-any cline-yes">9x</span>
|
|
337
|
-
<span class="cline-any cline-yes">9x</span>
|
|
338
|
-
<span class="cline-any cline-yes">1x</span>
|
|
339
|
-
<span class="cline-any cline-yes">1x</span>
|
|
340
|
-
<span class="cline-any cline-yes">1x</span>
|
|
341
|
-
<span class="cline-any cline-yes">1x</span>
|
|
342
|
-
<span class="cline-any cline-yes">7x</span>
|
|
343
|
-
<span class="cline-any cline-yes">7x</span>
|
|
344
|
-
<span class="cline-any cline-yes">7x</span>
|
|
345
|
-
<span class="cline-any cline-yes">7x</span>
|
|
346
309
|
<span class="cline-any cline-yes">2x</span>
|
|
347
|
-
<span class="cline-any cline-yes">
|
|
348
|
-
<span class="cline-any cline-yes">
|
|
310
|
+
<span class="cline-any cline-yes">2x</span>
|
|
311
|
+
<span class="cline-any cline-yes">2x</span>
|
|
312
|
+
<span class="cline-any cline-yes">48x</span>
|
|
313
|
+
<span class="cline-any cline-yes">38x</span>
|
|
314
|
+
<span class="cline-any cline-yes">38x</span>
|
|
315
|
+
<span class="cline-any cline-yes">38x</span>
|
|
316
|
+
<span class="cline-any cline-yes">48x</span>
|
|
317
|
+
<span class="cline-any cline-yes">38x</span>
|
|
318
|
+
<span class="cline-any cline-yes">2x</span>
|
|
319
|
+
<span class="cline-any cline-yes">2x</span>
|
|
320
|
+
<span class="cline-any cline-yes">2x</span>
|
|
321
|
+
<span class="cline-any cline-yes">2x</span>
|
|
322
|
+
<span class="cline-any cline-yes">2x</span>
|
|
323
|
+
<span class="cline-any cline-yes">29x</span>
|
|
324
|
+
<span class="cline-any cline-yes">29x</span>
|
|
325
|
+
<span class="cline-any cline-yes">26x</span>
|
|
326
|
+
<span class="cline-any cline-yes">26x</span>
|
|
327
|
+
<span class="cline-any cline-yes">26x</span>
|
|
328
|
+
<span class="cline-any cline-yes">26x</span>
|
|
329
|
+
<span class="cline-any cline-yes">26x</span>
|
|
330
|
+
<span class="cline-any cline-yes">18x</span>
|
|
331
|
+
<span class="cline-any cline-yes">18x</span>
|
|
332
|
+
<span class="cline-any cline-yes">18x</span>
|
|
333
|
+
<span class="cline-any cline-yes">26x</span>
|
|
334
|
+
<span class="cline-any cline-yes">26x</span>
|
|
335
|
+
<span class="cline-any cline-yes">2x</span>
|
|
336
|
+
<span class="cline-any cline-yes">2x</span>
|
|
337
|
+
<span class="cline-any cline-yes">2x</span>
|
|
338
|
+
<span class="cline-any cline-yes">2x</span>
|
|
339
|
+
<span class="cline-any cline-yes">19x</span>
|
|
340
|
+
<span class="cline-any cline-yes">19x</span>
|
|
341
|
+
<span class="cline-any cline-yes">19x</span>
|
|
342
|
+
<span class="cline-any cline-yes">19x</span>
|
|
343
|
+
<span class="cline-any cline-yes">19x</span>
|
|
344
|
+
<span class="cline-any cline-yes">19x</span>
|
|
345
|
+
<span class="cline-any cline-yes">19x</span>
|
|
346
|
+
<span class="cline-any cline-yes">2x</span>
|
|
347
|
+
<span class="cline-any cline-yes">2x</span>
|
|
348
|
+
<span class="cline-any cline-yes">2x</span>
|
|
349
|
+
<span class="cline-any cline-yes">2x</span>
|
|
349
350
|
<span class="cline-any cline-yes">5x</span>
|
|
350
|
-
<span class="cline-any cline-yes">7x</span>
|
|
351
|
-
<span class="cline-any cline-yes">7x</span>
|
|
352
|
-
<span class="cline-any cline-yes">7x</span>
|
|
353
|
-
<span class="cline-any cline-yes">7x</span>
|
|
354
|
-
<span class="cline-any cline-yes">1x</span>
|
|
355
|
-
<span class="cline-any cline-yes">1x</span>
|
|
356
|
-
<span class="cline-any cline-yes">1x</span>
|
|
357
|
-
<span class="cline-any cline-yes">1x</span>
|
|
358
|
-
<span class="cline-any cline-no"> </span>
|
|
359
|
-
<span class="cline-any cline-no"> </span>
|
|
360
351
|
<span class="cline-any cline-no"> </span>
|
|
361
352
|
<span class="cline-any cline-no"> </span>
|
|
362
353
|
<span class="cline-any cline-no"> </span>
|
|
363
|
-
<span class="cline-any cline-yes">
|
|
354
|
+
<span class="cline-any cline-yes">5x</span>
|
|
355
|
+
<span class="cline-any cline-yes">2x</span>
|
|
364
356
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
365
357
|
import { LRUCache } from 'lru-cache'
|
|
366
358
|
import makeDebug from 'debug'
|
|
@@ -405,7 +397,6 @@ export default {
|
|
|
405
397
|
}, {
|
|
406
398
|
user: params.user
|
|
407
399
|
})
|
|
408
|
-
await this.updateAbilities(subject)
|
|
409
400
|
debug('Authorisation ' + data.permissions + ' set for subject ' + subject._id + ' on resource ' + params.resource._id + ' with scope ' + scopeName)
|
|
410
401
|
return subject
|
|
411
402
|
}))
|
|
@@ -438,7 +429,6 @@ export default {
|
|
|
438
429
|
}, {
|
|
439
430
|
user: params.user
|
|
440
431
|
})
|
|
441
|
-
await this.updateAbilities(subject)
|
|
442
432
|
debug('Authorisation unset for subject ' + subject._id + ' on resource ' + id + ' with scope ' + scopeName)
|
|
443
433
|
return subject
|
|
444
434
|
}
|
|
@@ -450,37 +440,40 @@ export default {
|
|
|
450
440
|
setup (app) {
|
|
451
441
|
const config = app.get('authorisation')
|
|
452
442
|
if (config && config.cache) {
|
|
443
|
+
this.cacheConfig = config.cache
|
|
453
444
|
// Store abilities of the N most active users in LRU cache (defaults to 1000)
|
|
454
|
-
const max =
|
|
445
|
+
const max = this.cacheConfig.maxUsers <span class="branch-0 cbranch-no" title="branch not covered" >|| 1000</span>
|
|
455
446
|
// LRU cache lib switched from positional parameters to options object at some point
|
|
456
447
|
// so that now we directly pass the options to it while before we used the max argument
|
|
457
|
-
if (!
|
|
458
|
-
this.cache = new LRUCache(
|
|
448
|
+
if (!this.cacheConfig.max && !this.cacheConfig.ttl && !this.cacheConfig.maxSize) this.cacheConfig.max = max
|
|
449
|
+
this.cache = new LRUCache(this.cacheConfig)
|
|
459
450
|
debug('Using LRU cache for user abilities')
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
|
|
451
|
+
} else {
|
|
452
|
+
debug('Do not use LRU cache for user abilities')
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
|
|
456
|
+
getCacheKey (subject) {
|
|
457
|
+
if (!this.cache) return null
|
|
458
|
+
let cacheKey
|
|
459
|
+
// Compute cache key based on provided function or user ID
|
|
460
|
+
if (typeof this.cacheConfig.key === 'function') <span class="branch-0 cbranch-no" title="branch not covered" >cacheKey = this.cacheConfig.key(subject)</span>
|
|
461
|
+
if (!cacheKey && subject && subject._id) cacheKey = subject._id.toString()
|
|
462
|
+
return cacheKey || ANONYMOUS_USER
|
|
463
463
|
},
|
|
464
464
|
|
|
465
465
|
// Compute abilities for a given user and set it in cache the first time
|
|
466
466
|
// or get it from cache if found
|
|
467
467
|
async getAbilities (subject) {
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
} else {
|
|
472
|
-
if (this.cache.has(ANONYMOUS_USER)) return this.cache.get(ANONYMOUS_USER)
|
|
473
|
-
}
|
|
474
|
-
}
|
|
468
|
+
const cacheKey = this.getCacheKey(subject)
|
|
469
|
+
if (cacheKey && this.cache.has(cacheKey)) return this.cache.get(cacheKey)
|
|
470
|
+
|
|
475
471
|
// Provide app for any complex use case requiring to make requests
|
|
476
472
|
const abilities = await defineAbilities(subject, this.app)
|
|
477
473
|
|
|
478
|
-
if (
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
} else {
|
|
482
|
-
this.cache.set(ANONYMOUS_USER, abilities)
|
|
483
|
-
}
|
|
474
|
+
if (cacheKey) {
|
|
475
|
+
debug('Updating abilities of subject ' + (subject ? subject._id : ANONYMOUS_USER) + ' with cache key ' + cacheKey)
|
|
476
|
+
this.cache.set(cacheKey, abilities)
|
|
484
477
|
}
|
|
485
478
|
|
|
486
479
|
return abilities
|
|
@@ -488,27 +481,22 @@ export default {
|
|
|
488
481
|
|
|
489
482
|
// Compute abilities for a given user and update it in cache
|
|
490
483
|
async updateAbilities (subject) {
|
|
491
|
-
|
|
484
|
+
const cacheKey = this.getCacheKey(subject)
|
|
485
|
+
|
|
486
|
+
// Remove abilities from cache so that next call will populate it again
|
|
487
|
+
if (cacheKey && this.cache.has(cacheKey)) this.cache.delete(cacheKey)
|
|
492
488
|
|
|
493
|
-
if (this.cache) {
|
|
494
|
-
if (subject && subject._id) {
|
|
495
|
-
this.cache.delete(subject._id.toString())
|
|
496
|
-
} else {
|
|
497
|
-
this.cache.delete(ANONYMOUS_USER)
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
489
|
const abilities = await this.getAbilities(subject)
|
|
502
490
|
return abilities
|
|
503
491
|
},
|
|
504
492
|
|
|
505
493
|
// Clear abilities
|
|
506
|
-
|
|
507
|
-
<span class="
|
|
494
|
+
clearAbilities() {
|
|
495
|
+
if (this.cache) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
508
496
|
<span class="cstat-no" title="statement not covered" > debug('Clearing user abilities cache')</span>
|
|
509
497
|
<span class="cstat-no" title="statement not covered" > this.cache.clear()</span>
|
|
510
498
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
511
|
-
|
|
499
|
+
}
|
|
512
500
|
}
|
|
513
501
|
</pre></td></tr></table></pre>
|
|
514
502
|
|
|
@@ -517,7 +505,7 @@ export default {
|
|
|
517
505
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
518
506
|
Code coverage generated by
|
|
519
507
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
520
|
-
at 2025-
|
|
508
|
+
at 2025-07-24T10:00:20.476Z
|
|
521
509
|
</div>
|
|
522
510
|
<script src="../../../../prettify.js"></script>
|
|
523
511
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">94.94% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>169/
|
|
28
|
+
<span class='fraction'>169/178</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">80% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>32/40</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>7/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">94.94% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>169/
|
|
49
|
+
<span class='fraction'>169/178</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -95,17 +95,17 @@
|
|
|
95
95
|
|
|
96
96
|
<tr>
|
|
97
97
|
<td class="file high" data-value="authorisations.service.js"><a href="authorisations.service.js.html">authorisations.service.js</a></td>
|
|
98
|
-
<td data-value="
|
|
99
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
98
|
+
<td data-value="93.79" class="pic high">
|
|
99
|
+
<div class="chart"><div class="cover-fill" style="width: 93%"></div><div class="cover-empty" style="width: 7%"></div></div>
|
|
100
100
|
</td>
|
|
101
|
-
<td data-value="
|
|
102
|
-
<td data-value="
|
|
103
|
-
<td data-value="
|
|
104
|
-
<td data-value="
|
|
105
|
-
<td data-value="
|
|
106
|
-
<td data-value="
|
|
107
|
-
<td data-value="
|
|
108
|
-
<td data-value="
|
|
101
|
+
<td data-value="93.79" class="pct high">93.79%</td>
|
|
102
|
+
<td data-value="145" class="abs high">136/145</td>
|
|
103
|
+
<td data-value="79.48" class="pct medium">79.48%</td>
|
|
104
|
+
<td data-value="39" class="abs medium">31/39</td>
|
|
105
|
+
<td data-value="100" class="pct high">100%</td>
|
|
106
|
+
<td data-value="7" class="abs high">7/7</td>
|
|
107
|
+
<td data-value="93.79" class="pct high">93.79%</td>
|
|
108
|
+
<td data-value="145" class="abs high">136/145</td>
|
|
109
109
|
</tr>
|
|
110
110
|
|
|
111
111
|
</tbody>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at 2025-
|
|
119
|
+
at 2025-07-24T10:00:20.476Z
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -178,7 +178,7 @@
|
|
|
178
178
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
179
179
|
Code coverage generated by
|
|
180
180
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
181
|
-
at 2025-
|
|
181
|
+
at 2025-07-24T10:00:20.476Z
|
|
182
182
|
</div>
|
|
183
183
|
<script src="../../../../prettify.js"></script>
|
|
184
184
|
<script>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
86
86
|
Code coverage generated by
|
|
87
87
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
88
|
-
at 2025-
|
|
88
|
+
at 2025-07-24T10:00:20.476Z
|
|
89
89
|
</div>
|
|
90
90
|
<script src="../../../../prettify.js"></script>
|
|
91
91
|
<script>
|