@kalisio/kdk 2.6.4 → 2.7.0
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/api/application.js +2 -4
- package/core/api/authentication.js +2 -3
- package/core/api/db.js +10 -2
- package/core/api/hooks/hooks.authorisations.js +4 -2
- package/core/api/hooks/hooks.push.js +6 -2
- package/core/api/hooks/hooks.query.js +29 -12
- package/core/api/hooks/hooks.users.js +30 -17
- package/core/api/models/configurations.model.mongodb.js +4 -0
- package/core/api/services/authorisations/authorisations.service.js +1 -1
- package/core/api/services/configurations/configurations.hooks.js +33 -0
- package/core/api/services/index.js +41 -7
- package/core/api/services/messages/messages.hooks.js +9 -3
- package/core/client/api.js +14 -1
- package/core/client/capabilities.js +1 -6
- package/core/client/components/KAvatar.vue +24 -20
- package/core/client/components/account/KProfile.vue +10 -71
- package/core/client/components/account/index.js +0 -2
- package/core/client/components/app/KSettings.vue +1 -0
- package/core/client/components/collection/KBoard.vue +4 -3
- package/core/client/components/collection/KCardSection.vue +1 -0
- package/core/client/components/collection/KGrid.vue +2 -0
- package/core/client/components/collection/KTable.vue +5 -1
- package/core/client/components/collection/KTimeLine.vue +9 -1
- package/core/client/components/collection/index.js +0 -2
- package/core/client/components/form/KChipsField.vue +2 -1
- package/core/client/components/form/KEmailField.vue +1 -0
- package/core/client/components/form/KFileField.vue +22 -1
- package/core/client/components/form/KForm.vue +2 -0
- package/core/client/components/form/KItemField.vue +1 -0
- package/core/client/components/form/KNumberField.vue +1 -0
- package/core/client/components/form/KPasswordField.vue +1 -0
- package/core/client/components/form/KPhoneField.vue +1 -0
- package/core/client/components/form/KPropertyItemField.vue +1 -0
- package/core/client/components/form/KResolutionField.vue +1 -0
- package/core/client/components/form/KSelectField.vue +31 -0
- package/core/client/components/form/KTagField.vue +1 -0
- package/core/client/components/form/KTextField.vue +1 -0
- package/core/client/components/form/KTokenField.vue +1 -0
- package/core/client/components/form/KUnitField.vue +1 -0
- package/core/client/components/form/KUrlField.vue +1 -0
- package/core/client/components/graphics/KIcon.vue +3 -4
- package/core/client/components/layout/KPage.vue +1 -0
- package/core/client/components/layout/KWindow.vue +6 -3
- package/core/client/components/messages/KMessageComposer.vue +2 -1
- package/core/client/components/messages/KMessagesTimeLine.vue +1 -1
- package/core/client/components/time/KDate.vue +1 -2
- package/core/client/components/time/KDateTime.vue +11 -11
- package/core/client/components/time/KTime.vue +1 -1
- package/core/client/composables/collection.js +33 -8
- package/core/client/composables/errors.js +1 -1
- package/core/client/composables/layout.js +9 -9
- package/core/client/configurations.js +50 -0
- package/core/client/exporter.js +1 -1
- package/core/client/i18n/core_en.json +6 -39
- package/core/client/i18n/core_fr.json +6 -39
- package/core/client/index.js +2 -0
- package/core/client/layout.js +8 -8
- package/core/client/mixins/mixin.base-activity.js +5 -2
- package/core/client/mixins/mixin.base-field.js +3 -3
- package/core/client/search.js +2 -1
- package/core/client/utils/utils.collection.js +8 -8
- package/core/client/utils/utils.items.js +4 -0
- package/core/client/utils/utils.push.js +3 -3
- package/core/client/utils/utils.session.js +7 -5
- package/core/client/utils/utils.shapes.js +38 -7
- package/core/client/utils/utils.time.js +21 -22
- package/core/common/schemas/users.update-profile.json +3 -2
- package/coverage/core/api/application.js.html +392 -398
- package/coverage/core/api/authentication.js.html +352 -187
- package/coverage/core/api/db.js.html +165 -126
- package/coverage/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/core/api/hooks/index.html +107 -122
- package/coverage/core/api/hooks/index.js.html +4 -10
- package/coverage/core/api/index.html +46 -61
- package/coverage/core/api/index.js.html +9 -9
- package/coverage/core/api/marshall.js.html +9 -9
- package/coverage/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/core/api/models/index.html +35 -50
- package/coverage/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/core/api/services/account/account.service.js.html +127 -127
- package/coverage/core/api/services/account/index.html +22 -22
- package/coverage/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/core/api/services/authorisations/index.html +21 -21
- package/coverage/core/api/services/{organisations/organisations.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/core/api/services/{groups → configurations}/index.html +8 -8
- 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/import-export/import-export.hooks.js.html +76 -76
- package/coverage/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/core/api/services/import-export/index.html +32 -32
- package/coverage/core/api/services/index.html +21 -21
- package/coverage/core/api/services/index.js.html +313 -142
- package/coverage/core/api/services/mailer/index.html +32 -32
- package/coverage/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/core/api/services/messages/index.html +21 -21
- package/coverage/core/api/services/messages/messages.hooks.js.html +112 -76
- package/coverage/core/api/services/push/index.html +32 -32
- package/coverage/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/core/api/services/push/push.service.js.html +34 -34
- package/coverage/core/api/services/storage/index.html +29 -29
- package/coverage/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/core/api/services/storage/storage.service.js.html +29 -29
- package/coverage/core/api/services/tags/index.html +21 -21
- package/coverage/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/core/api/services/users/index.html +27 -12
- package/coverage/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/core/api/services/users/users.service.js.html +100 -0
- package/coverage/core/common/errors.js.html +1 -1
- package/coverage/core/common/index.html +42 -27
- package/coverage/core/common/index.js.html +1 -1
- package/coverage/core/common/permissions.js.html +166 -472
- package/coverage/core/common/schema.js.html +4 -4
- package/coverage/core/common/utils.js.html +31 -25
- package/coverage/core/common/utils.offline.js.html +199 -0
- package/coverage/index.html +192 -192
- package/coverage/lcov-report/core/api/application.js.html +392 -398
- package/coverage/lcov-report/core/api/authentication.js.html +352 -187
- package/coverage/lcov-report/core/api/db.js.html +165 -126
- package/coverage/lcov-report/core/api/hooks/hooks.authentication.js.html +22 -196
- package/coverage/lcov-report/core/api/hooks/hooks.authorisations.js.html +383 -662
- package/coverage/lcov-report/core/api/hooks/hooks.logger.js.html +41 -41
- package/coverage/lcov-report/core/api/hooks/hooks.model.js.html +113 -101
- package/coverage/lcov-report/core/api/hooks/hooks.push.js.html +124 -97
- package/coverage/lcov-report/core/api/hooks/hooks.query.js.html +292 -217
- package/coverage/lcov-report/core/api/hooks/hooks.schemas.js.html +123 -123
- package/coverage/lcov-report/core/api/hooks/hooks.service.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/hooks.storage.js.html +1 -1
- package/coverage/lcov-report/core/api/hooks/{hooks.groups.js.html → hooks.tags.js.html} +100 -76
- package/coverage/lcov-report/core/api/hooks/hooks.users.js.html +255 -447
- package/coverage/lcov-report/core/api/hooks/index.html +107 -122
- package/coverage/lcov-report/core/api/hooks/index.js.html +4 -10
- package/coverage/lcov-report/core/api/index.html +46 -61
- package/coverage/lcov-report/core/api/index.js.html +9 -9
- package/coverage/lcov-report/core/api/marshall.js.html +9 -9
- package/coverage/lcov-report/core/api/models/{organisations.model.mongodb.js.html → configurations.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/core/api/models/index.html +35 -50
- package/coverage/lcov-report/core/api/models/messages.model.mongodb.js.html +39 -27
- package/coverage/lcov-report/core/api/models/tags.model.mongodb.js.html +26 -32
- package/coverage/lcov-report/core/api/models/users.model.mongodb.js.html +10 -10
- package/coverage/lcov-report/core/api/services/account/account.hooks.js.html +5 -5
- package/coverage/lcov-report/core/api/services/account/account.service.js.html +127 -127
- package/coverage/lcov-report/core/api/services/account/index.html +22 -22
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.hooks.js.html +1 -1
- package/coverage/lcov-report/core/api/services/authorisations/authorisations.service.js.html +213 -222
- package/coverage/lcov-report/core/api/services/authorisations/index.html +21 -21
- package/coverage/lcov-report/core/api/services/{groups/groups.hooks.js.html → configurations/configurations.hooks.js.html} +16 -10
- package/coverage/lcov-report/core/api/services/{groups → configurations}/index.html +8 -8
- 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/import-export/import-export.hooks.js.html +76 -76
- package/coverage/lcov-report/core/api/services/import-export/import-export.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/import-export/index.html +32 -32
- package/coverage/lcov-report/core/api/services/index.html +21 -21
- package/coverage/lcov-report/core/api/services/index.js.html +313 -142
- package/coverage/lcov-report/core/api/services/mailer/index.html +32 -32
- package/coverage/lcov-report/core/api/services/mailer/mailer.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/mailer/mailer.service.js.html +32 -32
- package/coverage/lcov-report/core/api/services/messages/index.html +21 -21
- package/coverage/lcov-report/core/api/services/messages/messages.hooks.js.html +112 -76
- package/coverage/lcov-report/core/api/services/push/index.html +32 -32
- package/coverage/lcov-report/core/api/services/push/push.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/push/push.service.js.html +34 -34
- package/coverage/lcov-report/core/api/services/storage/index.html +29 -29
- package/coverage/lcov-report/core/api/services/storage/storage.hooks.js.html +80 -80
- package/coverage/lcov-report/core/api/services/storage/storage.service.js.html +29 -29
- package/coverage/lcov-report/core/api/services/tags/index.html +21 -21
- package/coverage/lcov-report/core/api/services/tags/tags.hooks.js.html +119 -71
- package/coverage/lcov-report/core/api/services/users/index.html +27 -12
- package/coverage/lcov-report/core/api/services/users/users.hooks.js.html +14 -11
- package/coverage/lcov-report/core/api/services/users/users.service.js.html +100 -0
- package/coverage/lcov-report/core/common/errors.js.html +1 -1
- package/coverage/lcov-report/core/common/index.html +42 -27
- package/coverage/lcov-report/core/common/index.js.html +1 -1
- package/coverage/lcov-report/core/common/permissions.js.html +166 -472
- package/coverage/lcov-report/core/common/schema.js.html +4 -4
- package/coverage/lcov-report/core/common/utils.js.html +31 -25
- package/coverage/lcov-report/core/common/utils.offline.js.html +199 -0
- package/coverage/lcov-report/index.html +192 -192
- package/coverage/lcov-report/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/lcov-report/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/lcov-report/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/lcov-report/map/api/hooks/index.html +7 -7
- package/coverage/lcov-report/map/api/hooks/index.js.html +1 -1
- package/coverage/lcov-report/map/api/index.html +1 -1
- package/coverage/lcov-report/map/api/index.js.html +1 -1
- package/coverage/lcov-report/map/api/marshall.js.html +1 -1
- package/coverage/lcov-report/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/lcov-report/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/map/api/models/index.html +22 -7
- package/coverage/lcov-report/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/lcov-report/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/lcov-report/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/lcov-report/map/api/services/alerts/index.html +1 -1
- package/coverage/lcov-report/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/lcov-report/map/api/services/catalog/index.html +5 -5
- 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 +86 -11
- package/coverage/lcov-report/map/api/services/features/features.service.js.html +307 -4
- package/coverage/lcov-report/map/api/services/features/index.html +7 -7
- package/coverage/lcov-report/map/api/services/index.html +5 -5
- package/coverage/lcov-report/map/api/services/index.js.html +326 -50
- package/coverage/lcov-report/map/api/services/projects/index.html +1 -1
- package/coverage/lcov-report/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{core/api/services/organisations → lcov-report/map/api/services/styles}/index.html +10 -25
- package/coverage/lcov-report/{core/api/services/organisations/organisations.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/lcov-report/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/errors.js.html +1 -1
- package/coverage/lcov-report/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/lcov-report/map/common/grid.js.html +1 -1
- package/coverage/lcov-report/map/common/index.html +19 -19
- package/coverage/lcov-report/map/common/index.js.html +1 -1
- package/coverage/lcov-report/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/moment-utils.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/opendap-utils.js.html +4 -7
- package/coverage/lcov-report/map/common/permissions.js.html +10 -4
- package/coverage/lcov-report/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/lcov-report/map/common/tms-utils.js.html +9 -12
- package/coverage/lcov-report/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/lcov-report/map/common/wcs-utils.js.html +12 -15
- package/coverage/lcov-report/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/lcov-report/map/common/wfs-utils.js.html +14 -17
- package/coverage/lcov-report/map/common/wms-utils.js.html +30 -12
- package/coverage/lcov-report/map/common/wmts-utils.js.html +10 -13
- package/coverage/lcov.info +4157 -3816
- package/coverage/map/api/hooks/hooks.catalog.js.html +169 -31
- package/coverage/map/api/hooks/hooks.features.js.html +1 -1
- package/coverage/map/api/hooks/hooks.query.js.html +215 -35
- package/coverage/map/api/hooks/index.html +7 -7
- package/coverage/map/api/hooks/index.js.html +1 -1
- package/coverage/map/api/index.html +1 -1
- package/coverage/map/api/index.js.html +1 -1
- package/coverage/map/api/marshall.js.html +1 -1
- package/coverage/map/api/models/alerts.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/catalog.model.mongodb.js.html +82 -7
- package/coverage/map/api/models/features.model.mongodb.js.html +1 -1
- package/coverage/map/api/models/index.html +22 -7
- package/coverage/map/api/models/projects.model.mongodb.js.html +1 -1
- package/coverage/{core/api/models/groups.model.mongodb.js.html → map/api/models/styles.model.mongodb.js.html} +10 -7
- package/coverage/map/api/services/alerts/alerts.hooks.js.html +1 -1
- package/coverage/map/api/services/alerts/alerts.service.js.html +1 -1
- package/coverage/map/api/services/alerts/index.html +1 -1
- package/coverage/map/api/services/catalog/catalog.hooks.js.html +39 -12
- package/coverage/map/api/services/catalog/index.html +5 -5
- 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 +86 -11
- package/coverage/map/api/services/features/features.service.js.html +307 -4
- package/coverage/map/api/services/features/index.html +7 -7
- package/coverage/map/api/services/index.html +5 -5
- package/coverage/map/api/services/index.js.html +326 -50
- package/coverage/map/api/services/projects/index.html +1 -1
- package/coverage/map/api/services/projects/projects.hooks.js.html +1 -1
- package/coverage/{lcov-report/core/api/services/organisations → map/api/services/styles}/index.html +10 -25
- package/coverage/{core/api/services/groups/groups.hooks.js.html → map/api/services/styles/styles.hooks.js.html} +45 -12
- package/coverage/map/common/dynamic-grid-source.js.html +1 -1
- package/coverage/map/common/errors.js.html +1 -1
- package/coverage/map/common/geotiff-grid-source.js.html +7 -10
- package/coverage/map/common/grid.js.html +1 -1
- package/coverage/map/common/index.html +19 -19
- package/coverage/map/common/index.js.html +1 -1
- package/coverage/map/common/meteo-model-grid-source.js.html +1 -1
- package/coverage/map/common/moment-utils.js.html +1 -1
- package/coverage/map/common/opendap-grid-source.js.html +1 -1
- package/coverage/map/common/opendap-utils.js.html +4 -7
- package/coverage/map/common/permissions.js.html +10 -4
- package/coverage/map/common/time-based-grid-source.js.html +1 -1
- package/coverage/map/common/tms-utils.js.html +9 -12
- package/coverage/map/common/wcs-grid-source.js.html +3 -3
- package/coverage/map/common/wcs-utils.js.html +12 -15
- package/coverage/map/common/weacast-grid-source.js.html +2 -2
- package/coverage/map/common/wfs-utils.js.html +14 -17
- package/coverage/map/common/wms-utils.js.html +30 -12
- package/coverage/map/common/wmts-utils.js.html +10 -13
- package/coverage/tmp/coverage-1028514-1773134124472-0.json +1 -0
- package/coverage/tmp/coverage-1028526-1773134124448-0.json +1 -0
- package/coverage/tmp/coverage-1028537-1773134124431-0.json +1 -0
- package/coverage/tmp/coverage-1028549-1773134124401-0.json +1 -0
- package/coverage/tmp/coverage-1028556-1773134124353-0.json +1 -0
- package/extras/configs/widgets.top.js +3 -3
- package/extras/tests/core/collection.mjs +2 -9
- package/extras/tours/pane.top.js +0 -9
- package/map/api/hooks/hooks.catalog.js +18 -4
- package/map/api/services/catalog/catalog.hooks.js +3 -0
- package/map/api/services/features/features.hooks.js +3 -1
- package/map/api/services/index.js +2 -6
- package/map/api/services/styles/styles.hooks.js +6 -1
- package/map/client/components/KFeatureActionButton.vue +9 -3
- package/map/client/components/KFeaturesFilterManager.vue +5 -5
- package/map/client/components/KFilterCondition.vue +17 -10
- package/map/client/components/KLayerEditor.vue +49 -39
- package/map/client/components/KMeasureTool.vue +7 -1
- package/map/client/components/KTimezoneMap.vue +29 -9
- package/map/client/components/catalog/KLayersPanel.vue +26 -16
- package/map/client/components/catalog/KLayersSelector.vue +13 -2
- package/map/client/components/catalog/KViewsPanel.vue +5 -4
- package/map/client/components/form/KSelectLayersField.vue +28 -17
- package/map/client/components/form/KSelectViewsField.vue +18 -9
- package/map/client/components/form/KTimezoneField.vue +1 -2
- package/map/client/components/legend/KVariablesLegend.vue +10 -1
- package/map/client/components/location/KLocationCardSection.vue +7 -2
- package/map/client/components/location/KLocationMap.vue +31 -7
- package/map/client/components/selection/KSelectedLayerFeatures.vue +2 -2
- package/map/client/components/stickies/KZoomControl.vue +1 -1
- package/map/client/components/styles/KStyleManager.vue +4 -1
- package/map/client/components/widget/KTimeSeries.vue +174 -497
- package/map/client/components/widget/KTimeSeriesSelector.vue +72 -0
- package/map/client/components/widget/KTimeSeriesToolbar.vue +83 -0
- package/map/client/composables/catalog.js +6 -10
- package/map/client/composables/highlight.js +12 -9
- package/map/client/composables/project.js +1 -1
- package/map/client/composables/selection.js +8 -7
- package/map/client/composables/weather.js +9 -2
- package/map/client/geolocation.js +8 -5
- package/map/client/i18n/map_en.json +11 -10
- package/map/client/i18n/map_fr.json +10 -9
- package/map/client/leaflet/TiledFeatureLayer.js +85 -82
- package/map/client/leaflet/utils/utils.geojson.js +3 -3
- package/map/client/mixins/globe/mixin.base-globe.js +15 -6
- package/map/client/mixins/globe/mixin.geojson-layers.js +27 -18
- package/map/client/mixins/map/mixin.edit-layers.js +9 -1
- package/map/client/mixins/map/mixin.pmtiles-layers.js +118 -29
- package/map/client/mixins/map/mixin.tiled-mesh-layers.js +12 -5
- package/map/client/mixins/map/mixin.tiled-wind-layers.js +19 -10
- package/map/client/mixins/mixin.activity.js +23 -30
- package/map/client/mixins/mixin.feature-selection.js +41 -5
- package/map/client/planets.js +1 -1
- package/map/client/readers/reader.kml.js +2 -3
- package/map/client/utils/utils.catalog.js +36 -10
- package/map/client/utils/utils.layers.js +39 -8
- package/map/client/utils/utils.project.js +4 -0
- package/map/client/utils/utils.style.js +37 -7
- package/map/client/utils/utils.time-series.js +215 -6
- package/map/common/schemas/catalog.update.json +1 -1
- package/map/common/weacast-grid-source.js +1 -1
- package/package.json +3 -3
- package/scripts/kash/CHANGELOG.md +0 -4
- package/scripts/kash/README.md +0 -9
- package/scripts/kash/kash.sh +45 -40
- package/scripts/kash/scripts/run_tests.sh +1 -4
- package/test/api/core/authentication.test.js +9 -4
- package/test/api/core/config/default.cjs +1 -0
- package/test/api/core/hooks.test.js +6 -0
- package/test/api/core/index.test.js +43 -18
- package/test/api/core/push.test.js +8 -8
- package/test/api/core/test-log-2026-03-10.log +60 -0
- package/test/api/core/users.test.js +384 -0
- package/test/api/map/grid-sources.test.js +1 -1
- package/test/api/map/test-log-2026-03-10.log +56 -0
- package/vite/package.json +11 -2
- package/vite/test/core/composables.test.js +77 -0
- package/vite/vitest.config.js +13 -0
- package/vite/yarn.lock +1096 -18
- package/.vscode/settings.json +0 -5
- package/core/client/components/account/KAccount.vue +0 -68
- package/core/client/components/account/KDeleteAccountManager.vue +0 -62
- package/core/client/components/account/KEmailManager.vue +0 -128
- package/core/client/components/account/KPasswordManager.vue +0 -90
- package/core/client/components/account/KVerifyEmailManager.vue +0 -105
- package/core/client/components/collection/KColumn.vue +0 -227
- package/core/client/components/collection/KHistory.vue +0 -113
- package/core/client/components/collection/KHistoryEntry.vue +0 -109
- package/coverage/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/core/api/utils.js.html +0 -118
- package/coverage/lcov-report/core/api/hooks/hooks.organisations.js.html +0 -541
- package/coverage/lcov-report/core/api/services/organisations/organisations.service.js.html +0 -343
- package/coverage/lcov-report/core/api/utils.js.html +0 -118
- package/coverage/tmp/coverage-151166-1723543324307-0.json +0 -1
- package/coverage/tmp/coverage-151178-1723543324283-0.json +0 -1
- package/coverage/tmp/coverage-151189-1723543324271-0.json +0 -1
- package/coverage/tmp/coverage-151201-1723543324248-0.json +0 -1
- package/coverage/tmp/coverage-151208-1723543324227-0.json +0 -1
- package/scripts/kash/LICENSE +0 -21
- package/test/api/core/test-log-2024-04-22.log +0 -84
- package/test/api/core/test-log-2024-04-23.log +0 -23
- package/test/api/core/test-log-2024-08-13.log +0 -3
- package/test/api/map/test-log-2025-03-08.log +0 -0
|
@@ -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">81.16% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>237/292</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">67.94% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>53/78</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">75% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>6/8</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">81.16% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>237/292</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line high'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -356,101 +356,7 @@
|
|
|
356
356
|
<a name='L291'></a><a href='#L291'>291</a>
|
|
357
357
|
<a name='L292'></a><a href='#L292'>292</a>
|
|
358
358
|
<a name='L293'></a><a href='#L293'>293</a>
|
|
359
|
-
<a name='L294'></a><a href='#L294'>294</a>
|
|
360
|
-
<a name='L295'></a><a href='#L295'>295</a>
|
|
361
|
-
<a name='L296'></a><a href='#L296'>296</a>
|
|
362
|
-
<a name='L297'></a><a href='#L297'>297</a>
|
|
363
|
-
<a name='L298'></a><a href='#L298'>298</a>
|
|
364
|
-
<a name='L299'></a><a href='#L299'>299</a>
|
|
365
|
-
<a name='L300'></a><a href='#L300'>300</a>
|
|
366
|
-
<a name='L301'></a><a href='#L301'>301</a>
|
|
367
|
-
<a name='L302'></a><a href='#L302'>302</a>
|
|
368
|
-
<a name='L303'></a><a href='#L303'>303</a>
|
|
369
|
-
<a name='L304'></a><a href='#L304'>304</a>
|
|
370
|
-
<a name='L305'></a><a href='#L305'>305</a>
|
|
371
|
-
<a name='L306'></a><a href='#L306'>306</a>
|
|
372
|
-
<a name='L307'></a><a href='#L307'>307</a>
|
|
373
|
-
<a name='L308'></a><a href='#L308'>308</a>
|
|
374
|
-
<a name='L309'></a><a href='#L309'>309</a>
|
|
375
|
-
<a name='L310'></a><a href='#L310'>310</a>
|
|
376
|
-
<a name='L311'></a><a href='#L311'>311</a>
|
|
377
|
-
<a name='L312'></a><a href='#L312'>312</a>
|
|
378
|
-
<a name='L313'></a><a href='#L313'>313</a>
|
|
379
|
-
<a name='L314'></a><a href='#L314'>314</a>
|
|
380
|
-
<a name='L315'></a><a href='#L315'>315</a>
|
|
381
|
-
<a name='L316'></a><a href='#L316'>316</a>
|
|
382
|
-
<a name='L317'></a><a href='#L317'>317</a>
|
|
383
|
-
<a name='L318'></a><a href='#L318'>318</a>
|
|
384
|
-
<a name='L319'></a><a href='#L319'>319</a>
|
|
385
|
-
<a name='L320'></a><a href='#L320'>320</a>
|
|
386
|
-
<a name='L321'></a><a href='#L321'>321</a>
|
|
387
|
-
<a name='L322'></a><a href='#L322'>322</a>
|
|
388
|
-
<a name='L323'></a><a href='#L323'>323</a>
|
|
389
|
-
<a name='L324'></a><a href='#L324'>324</a>
|
|
390
|
-
<a name='L325'></a><a href='#L325'>325</a>
|
|
391
|
-
<a name='L326'></a><a href='#L326'>326</a>
|
|
392
|
-
<a name='L327'></a><a href='#L327'>327</a>
|
|
393
|
-
<a name='L328'></a><a href='#L328'>328</a>
|
|
394
|
-
<a name='L329'></a><a href='#L329'>329</a>
|
|
395
|
-
<a name='L330'></a><a href='#L330'>330</a>
|
|
396
|
-
<a name='L331'></a><a href='#L331'>331</a>
|
|
397
|
-
<a name='L332'></a><a href='#L332'>332</a>
|
|
398
|
-
<a name='L333'></a><a href='#L333'>333</a>
|
|
399
|
-
<a name='L334'></a><a href='#L334'>334</a>
|
|
400
|
-
<a name='L335'></a><a href='#L335'>335</a>
|
|
401
|
-
<a name='L336'></a><a href='#L336'>336</a>
|
|
402
|
-
<a name='L337'></a><a href='#L337'>337</a>
|
|
403
|
-
<a name='L338'></a><a href='#L338'>338</a>
|
|
404
|
-
<a name='L339'></a><a href='#L339'>339</a>
|
|
405
|
-
<a name='L340'></a><a href='#L340'>340</a>
|
|
406
|
-
<a name='L341'></a><a href='#L341'>341</a>
|
|
407
|
-
<a name='L342'></a><a href='#L342'>342</a>
|
|
408
|
-
<a name='L343'></a><a href='#L343'>343</a>
|
|
409
|
-
<a name='L344'></a><a href='#L344'>344</a>
|
|
410
|
-
<a name='L345'></a><a href='#L345'>345</a>
|
|
411
|
-
<a name='L346'></a><a href='#L346'>346</a>
|
|
412
|
-
<a name='L347'></a><a href='#L347'>347</a>
|
|
413
|
-
<a name='L348'></a><a href='#L348'>348</a>
|
|
414
|
-
<a name='L349'></a><a href='#L349'>349</a>
|
|
415
|
-
<a name='L350'></a><a href='#L350'>350</a>
|
|
416
|
-
<a name='L351'></a><a href='#L351'>351</a>
|
|
417
|
-
<a name='L352'></a><a href='#L352'>352</a>
|
|
418
|
-
<a name='L353'></a><a href='#L353'>353</a>
|
|
419
|
-
<a name='L354'></a><a href='#L354'>354</a>
|
|
420
|
-
<a name='L355'></a><a href='#L355'>355</a>
|
|
421
|
-
<a name='L356'></a><a href='#L356'>356</a>
|
|
422
|
-
<a name='L357'></a><a href='#L357'>357</a>
|
|
423
|
-
<a name='L358'></a><a href='#L358'>358</a>
|
|
424
|
-
<a name='L359'></a><a href='#L359'>359</a>
|
|
425
|
-
<a name='L360'></a><a href='#L360'>360</a>
|
|
426
|
-
<a name='L361'></a><a href='#L361'>361</a>
|
|
427
|
-
<a name='L362'></a><a href='#L362'>362</a>
|
|
428
|
-
<a name='L363'></a><a href='#L363'>363</a>
|
|
429
|
-
<a name='L364'></a><a href='#L364'>364</a>
|
|
430
|
-
<a name='L365'></a><a href='#L365'>365</a>
|
|
431
|
-
<a name='L366'></a><a href='#L366'>366</a>
|
|
432
|
-
<a name='L367'></a><a href='#L367'>367</a>
|
|
433
|
-
<a name='L368'></a><a href='#L368'>368</a>
|
|
434
|
-
<a name='L369'></a><a href='#L369'>369</a>
|
|
435
|
-
<a name='L370'></a><a href='#L370'>370</a>
|
|
436
|
-
<a name='L371'></a><a href='#L371'>371</a>
|
|
437
|
-
<a name='L372'></a><a href='#L372'>372</a>
|
|
438
|
-
<a name='L373'></a><a href='#L373'>373</a>
|
|
439
|
-
<a name='L374'></a><a href='#L374'>374</a>
|
|
440
|
-
<a name='L375'></a><a href='#L375'>375</a>
|
|
441
|
-
<a name='L376'></a><a href='#L376'>376</a>
|
|
442
|
-
<a name='L377'></a><a href='#L377'>377</a>
|
|
443
|
-
<a name='L378'></a><a href='#L378'>378</a>
|
|
444
|
-
<a name='L379'></a><a href='#L379'>379</a>
|
|
445
|
-
<a name='L380'></a><a href='#L380'>380</a>
|
|
446
|
-
<a name='L381'></a><a href='#L381'>381</a>
|
|
447
|
-
<a name='L382'></a><a href='#L382'>382</a>
|
|
448
|
-
<a name='L383'></a><a href='#L383'>383</a>
|
|
449
|
-
<a name='L384'></a><a href='#L384'>384</a>
|
|
450
|
-
<a name='L385'></a><a href='#L385'>385</a>
|
|
451
|
-
<a name='L386'></a><a href='#L386'>386</a>
|
|
452
|
-
<a name='L387'></a><a href='#L387'>387</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
453
|
-
<span class="cline-any cline-yes">1x</span>
|
|
359
|
+
<a name='L294'></a><a href='#L294'>294</a></td><td class="line-coverage quiet"><span class="cline-any cline-yes">1x</span>
|
|
454
360
|
<span class="cline-any cline-yes">1x</span>
|
|
455
361
|
<span class="cline-any cline-yes">1x</span>
|
|
456
362
|
<span class="cline-any cline-yes">1x</span>
|
|
@@ -488,12 +394,12 @@
|
|
|
488
394
|
<span class="cline-any cline-yes">2x</span>
|
|
489
395
|
<span class="cline-any cline-yes">1x</span>
|
|
490
396
|
<span class="cline-any cline-yes">1x</span>
|
|
397
|
+
<span class="cline-any cline-yes">4x</span>
|
|
491
398
|
<span class="cline-any cline-no"> </span>
|
|
492
399
|
<span class="cline-any cline-no"> </span>
|
|
493
|
-
<span class="cline-any cline-
|
|
494
|
-
<span class="cline-any cline-
|
|
495
|
-
<span class="cline-any cline-
|
|
496
|
-
<span class="cline-any cline-no"> </span>
|
|
400
|
+
<span class="cline-any cline-yes">4x</span>
|
|
401
|
+
<span class="cline-any cline-yes">4x</span>
|
|
402
|
+
<span class="cline-any cline-yes">4x</span>
|
|
497
403
|
<span class="cline-any cline-yes">1x</span>
|
|
498
404
|
<span class="cline-any cline-yes">1x</span>
|
|
499
405
|
<span class="cline-any cline-no"> </span>
|
|
@@ -504,12 +410,12 @@
|
|
|
504
410
|
<span class="cline-any cline-no"> </span>
|
|
505
411
|
<span class="cline-any cline-yes">1x</span>
|
|
506
412
|
<span class="cline-any cline-yes">1x</span>
|
|
413
|
+
<span class="cline-any cline-yes">4x</span>
|
|
507
414
|
<span class="cline-any cline-no"> </span>
|
|
508
415
|
<span class="cline-any cline-no"> </span>
|
|
509
|
-
<span class="cline-any cline-
|
|
510
|
-
<span class="cline-any cline-
|
|
511
|
-
<span class="cline-any cline-
|
|
512
|
-
<span class="cline-any cline-no"> </span>
|
|
416
|
+
<span class="cline-any cline-yes">4x</span>
|
|
417
|
+
<span class="cline-any cline-yes">4x</span>
|
|
418
|
+
<span class="cline-any cline-yes">4x</span>
|
|
513
419
|
<span class="cline-any cline-yes">1x</span>
|
|
514
420
|
<span class="cline-any cline-yes">1x</span>
|
|
515
421
|
<span class="cline-any cline-no"> </span>
|
|
@@ -520,274 +426,159 @@
|
|
|
520
426
|
<span class="cline-any cline-no"> </span>
|
|
521
427
|
<span class="cline-any cline-yes">1x</span>
|
|
522
428
|
<span class="cline-any cline-yes">1x</span>
|
|
429
|
+
<span class="cline-any cline-yes">4x</span>
|
|
523
430
|
<span class="cline-any cline-no"> </span>
|
|
524
431
|
<span class="cline-any cline-no"> </span>
|
|
432
|
+
<span class="cline-any cline-yes">4x</span>
|
|
433
|
+
<span class="cline-any cline-yes">4x</span>
|
|
434
|
+
<span class="cline-any cline-yes">4x</span>
|
|
435
|
+
<span class="cline-any cline-yes">4x</span>
|
|
436
|
+
<span class="cline-any cline-yes">4x</span>
|
|
437
|
+
<span class="cline-any cline-yes">4x</span>
|
|
438
|
+
<span class="cline-any cline-yes">4x</span>
|
|
439
|
+
<span class="cline-any cline-yes">3x</span>
|
|
440
|
+
<span class="cline-any cline-yes">3x</span>
|
|
441
|
+
<span class="cline-any cline-yes">3x</span>
|
|
442
|
+
<span class="cline-any cline-yes">4x</span>
|
|
443
|
+
<span class="cline-any cline-yes">4x</span>
|
|
444
|
+
<span class="cline-any cline-yes">3x</span>
|
|
445
|
+
<span class="cline-any cline-yes">3x</span>
|
|
446
|
+
<span class="cline-any cline-yes">3x</span>
|
|
447
|
+
<span class="cline-any cline-yes">3x</span>
|
|
448
|
+
<span class="cline-any cline-yes">3x</span>
|
|
449
|
+
<span class="cline-any cline-yes">3x</span>
|
|
450
|
+
<span class="cline-any cline-yes">3x</span>
|
|
451
|
+
<span class="cline-any cline-yes">3x</span>
|
|
452
|
+
<span class="cline-any cline-yes">3x</span>
|
|
453
|
+
<span class="cline-any cline-yes">3x</span>
|
|
454
|
+
<span class="cline-any cline-yes">3x</span>
|
|
455
|
+
<span class="cline-any cline-yes">3x</span>
|
|
456
|
+
<span class="cline-any cline-yes">3x</span>
|
|
457
|
+
<span class="cline-any cline-yes">3x</span>
|
|
525
458
|
<span class="cline-any cline-no"> </span>
|
|
526
459
|
<span class="cline-any cline-no"> </span>
|
|
527
460
|
<span class="cline-any cline-no"> </span>
|
|
528
|
-
<span class="cline-any cline-
|
|
529
|
-
<span class="cline-any cline-
|
|
530
|
-
<span class="cline-any cline-
|
|
531
|
-
<span class="cline-any cline-
|
|
532
|
-
<span class="cline-any cline-
|
|
533
|
-
<span class="cline-any cline-
|
|
534
|
-
<span class="cline-any cline-
|
|
535
|
-
<span class="cline-any cline-
|
|
536
|
-
<span class="cline-any cline-
|
|
537
|
-
<span class="cline-any cline-
|
|
538
|
-
<span class="cline-any cline-
|
|
539
|
-
<span class="cline-any cline-
|
|
540
|
-
<span class="cline-any cline-
|
|
541
|
-
<span class="cline-any cline-
|
|
542
|
-
<span class="cline-any cline-
|
|
543
|
-
<span class="cline-any cline-no"> </span>
|
|
544
|
-
<span class="cline-any cline-no"> </span>
|
|
545
|
-
<span class="cline-any cline-no"> </span>
|
|
546
|
-
<span class="cline-any cline-no"> </span>
|
|
547
|
-
<span class="cline-any cline-no"> </span>
|
|
548
|
-
<span class="cline-any cline-no"> </span>
|
|
549
|
-
<span class="cline-any cline-no"> </span>
|
|
550
|
-
<span class="cline-any cline-no"> </span>
|
|
551
|
-
<span class="cline-any cline-no"> </span>
|
|
552
|
-
<span class="cline-any cline-no"> </span>
|
|
553
|
-
<span class="cline-any cline-no"> </span>
|
|
554
|
-
<span class="cline-any cline-no"> </span>
|
|
555
|
-
<span class="cline-any cline-no"> </span>
|
|
556
|
-
<span class="cline-any cline-no"> </span>
|
|
557
|
-
<span class="cline-any cline-no"> </span>
|
|
558
|
-
<span class="cline-any cline-no"> </span>
|
|
559
|
-
<span class="cline-any cline-no"> </span>
|
|
560
|
-
<span class="cline-any cline-no"> </span>
|
|
561
|
-
<span class="cline-any cline-no"> </span>
|
|
562
|
-
<span class="cline-any cline-no"> </span>
|
|
563
|
-
<span class="cline-any cline-no"> </span>
|
|
564
|
-
<span class="cline-any cline-no"> </span>
|
|
565
|
-
<span class="cline-any cline-no"> </span>
|
|
566
|
-
<span class="cline-any cline-no"> </span>
|
|
567
|
-
<span class="cline-any cline-no"> </span>
|
|
568
|
-
<span class="cline-any cline-no"> </span>
|
|
569
|
-
<span class="cline-any cline-no"> </span>
|
|
570
|
-
<span class="cline-any cline-no"> </span>
|
|
571
|
-
<span class="cline-any cline-no"> </span>
|
|
572
|
-
<span class="cline-any cline-no"> </span>
|
|
573
|
-
<span class="cline-any cline-no"> </span>
|
|
574
|
-
<span class="cline-any cline-no"> </span>
|
|
575
|
-
<span class="cline-any cline-no"> </span>
|
|
576
|
-
<span class="cline-any cline-no"> </span>
|
|
577
|
-
<span class="cline-any cline-no"> </span>
|
|
578
|
-
<span class="cline-any cline-no"> </span>
|
|
579
|
-
<span class="cline-any cline-no"> </span>
|
|
580
|
-
<span class="cline-any cline-no"> </span>
|
|
581
|
-
<span class="cline-any cline-no"> </span>
|
|
582
|
-
<span class="cline-any cline-no"> </span>
|
|
583
|
-
<span class="cline-any cline-no"> </span>
|
|
584
|
-
<span class="cline-any cline-no"> </span>
|
|
585
|
-
<span class="cline-any cline-no"> </span>
|
|
586
|
-
<span class="cline-any cline-no"> </span>
|
|
587
|
-
<span class="cline-any cline-no"> </span>
|
|
588
|
-
<span class="cline-any cline-no"> </span>
|
|
589
|
-
<span class="cline-any cline-no"> </span>
|
|
590
|
-
<span class="cline-any cline-no"> </span>
|
|
591
|
-
<span class="cline-any cline-no"> </span>
|
|
592
|
-
<span class="cline-any cline-no"> </span>
|
|
593
|
-
<span class="cline-any cline-no"> </span>
|
|
594
|
-
<span class="cline-any cline-no"> </span>
|
|
595
|
-
<span class="cline-any cline-no"> </span>
|
|
596
|
-
<span class="cline-any cline-no"> </span>
|
|
597
|
-
<span class="cline-any cline-no"> </span>
|
|
461
|
+
<span class="cline-any cline-yes">3x</span>
|
|
462
|
+
<span class="cline-any cline-yes">3x</span>
|
|
463
|
+
<span class="cline-any cline-yes">3x</span>
|
|
464
|
+
<span class="cline-any cline-yes">3x</span>
|
|
465
|
+
<span class="cline-any cline-yes">3x</span>
|
|
466
|
+
<span class="cline-any cline-yes">3x</span>
|
|
467
|
+
<span class="cline-any cline-yes">3x</span>
|
|
468
|
+
<span class="cline-any cline-yes">3x</span>
|
|
469
|
+
<span class="cline-any cline-yes">3x</span>
|
|
470
|
+
<span class="cline-any cline-yes">3x</span>
|
|
471
|
+
<span class="cline-any cline-yes">3x</span>
|
|
472
|
+
<span class="cline-any cline-yes">3x</span>
|
|
473
|
+
<span class="cline-any cline-yes">3x</span>
|
|
474
|
+
<span class="cline-any cline-yes">3x</span>
|
|
475
|
+
<span class="cline-any cline-yes">3x</span>
|
|
598
476
|
<span class="cline-any cline-yes">1x</span>
|
|
477
|
+
<span class="cline-any cline-yes">3x</span>
|
|
478
|
+
<span class="cline-any cline-yes">2x</span>
|
|
479
|
+
<span class="cline-any cline-yes">2x</span>
|
|
480
|
+
<span class="cline-any cline-yes">3x</span>
|
|
481
|
+
<span class="cline-any cline-yes">3x</span>
|
|
599
482
|
<span class="cline-any cline-yes">1x</span>
|
|
600
|
-
<span class="cline-any cline-no"> </span>
|
|
601
|
-
<span class="cline-any cline-no"> </span>
|
|
602
|
-
<span class="cline-any cline-no"> </span>
|
|
603
|
-
<span class="cline-any cline-no"> </span>
|
|
604
|
-
<span class="cline-any cline-no"> </span>
|
|
605
|
-
<span class="cline-any cline-no"> </span>
|
|
606
|
-
<span class="cline-any cline-no"> </span>
|
|
607
|
-
<span class="cline-any cline-no"> </span>
|
|
608
|
-
<span class="cline-any cline-no"> </span>
|
|
609
|
-
<span class="cline-any cline-no"> </span>
|
|
610
|
-
<span class="cline-any cline-no"> </span>
|
|
611
|
-
<span class="cline-any cline-no"> </span>
|
|
612
|
-
<span class="cline-any cline-no"> </span>
|
|
613
|
-
<span class="cline-any cline-no"> </span>
|
|
614
|
-
<span class="cline-any cline-no"> </span>
|
|
615
|
-
<span class="cline-any cline-no"> </span>
|
|
616
|
-
<span class="cline-any cline-no"> </span>
|
|
617
|
-
<span class="cline-any cline-no"> </span>
|
|
618
|
-
<span class="cline-any cline-no"> </span>
|
|
619
|
-
<span class="cline-any cline-no"> </span>
|
|
620
|
-
<span class="cline-any cline-no"> </span>
|
|
621
|
-
<span class="cline-any cline-no"> </span>
|
|
622
|
-
<span class="cline-any cline-no"> </span>
|
|
623
|
-
<span class="cline-any cline-no"> </span>
|
|
624
|
-
<span class="cline-any cline-no"> </span>
|
|
625
|
-
<span class="cline-any cline-no"> </span>
|
|
626
|
-
<span class="cline-any cline-no"> </span>
|
|
627
|
-
<span class="cline-any cline-no"> </span>
|
|
628
|
-
<span class="cline-any cline-no"> </span>
|
|
629
|
-
<span class="cline-any cline-no"> </span>
|
|
630
|
-
<span class="cline-any cline-no"> </span>
|
|
631
|
-
<span class="cline-any cline-no"> </span>
|
|
632
|
-
<span class="cline-any cline-no"> </span>
|
|
633
|
-
<span class="cline-any cline-no"> </span>
|
|
634
|
-
<span class="cline-any cline-no"> </span>
|
|
635
|
-
<span class="cline-any cline-no"> </span>
|
|
636
|
-
<span class="cline-any cline-no"> </span>
|
|
637
|
-
<span class="cline-any cline-no"> </span>
|
|
638
|
-
<span class="cline-any cline-no"> </span>
|
|
639
|
-
<span class="cline-any cline-no"> </span>
|
|
640
|
-
<span class="cline-any cline-no"> </span>
|
|
641
|
-
<span class="cline-any cline-no"> </span>
|
|
642
|
-
<span class="cline-any cline-no"> </span>
|
|
643
|
-
<span class="cline-any cline-no"> </span>
|
|
644
|
-
<span class="cline-any cline-no"> </span>
|
|
645
|
-
<span class="cline-any cline-no"> </span>
|
|
646
|
-
<span class="cline-any cline-no"> </span>
|
|
647
|
-
<span class="cline-any cline-no"> </span>
|
|
648
|
-
<span class="cline-any cline-no"> </span>
|
|
649
|
-
<span class="cline-any cline-no"> </span>
|
|
650
|
-
<span class="cline-any cline-no"> </span>
|
|
651
|
-
<span class="cline-any cline-no"> </span>
|
|
652
|
-
<span class="cline-any cline-no"> </span>
|
|
653
|
-
<span class="cline-any cline-no"> </span>
|
|
654
|
-
<span class="cline-any cline-no"> </span>
|
|
655
|
-
<span class="cline-any cline-no"> </span>
|
|
656
|
-
<span class="cline-any cline-no"> </span>
|
|
657
|
-
<span class="cline-any cline-no"> </span>
|
|
658
|
-
<span class="cline-any cline-no"> </span>
|
|
659
|
-
<span class="cline-any cline-no"> </span>
|
|
660
|
-
<span class="cline-any cline-no"> </span>
|
|
661
|
-
<span class="cline-any cline-no"> </span>
|
|
662
|
-
<span class="cline-any cline-no"> </span>
|
|
663
|
-
<span class="cline-any cline-no"> </span>
|
|
664
|
-
<span class="cline-any cline-no"> </span>
|
|
665
|
-
<span class="cline-any cline-no"> </span>
|
|
666
|
-
<span class="cline-any cline-no"> </span>
|
|
667
|
-
<span class="cline-any cline-no"> </span>
|
|
668
|
-
<span class="cline-any cline-no"> </span>
|
|
669
|
-
<span class="cline-any cline-no"> </span>
|
|
670
|
-
<span class="cline-any cline-no"> </span>
|
|
671
|
-
<span class="cline-any cline-no"> </span>
|
|
672
|
-
<span class="cline-any cline-no"> </span>
|
|
673
|
-
<span class="cline-any cline-no"> </span>
|
|
674
|
-
<span class="cline-any cline-no"> </span>
|
|
675
|
-
<span class="cline-any cline-no"> </span>
|
|
676
|
-
<span class="cline-any cline-no"> </span>
|
|
677
|
-
<span class="cline-any cline-no"> </span>
|
|
678
|
-
<span class="cline-any cline-no"> </span>
|
|
679
|
-
<span class="cline-any cline-no"> </span>
|
|
680
|
-
<span class="cline-any cline-no"> </span>
|
|
681
|
-
<span class="cline-any cline-no"> </span>
|
|
682
|
-
<span class="cline-any cline-no"> </span>
|
|
683
|
-
<span class="cline-any cline-no"> </span>
|
|
684
|
-
<span class="cline-any cline-no"> </span>
|
|
685
|
-
<span class="cline-any cline-no"> </span>
|
|
686
|
-
<span class="cline-any cline-no"> </span>
|
|
687
|
-
<span class="cline-any cline-no"> </span>
|
|
688
|
-
<span class="cline-any cline-no"> </span>
|
|
689
|
-
<span class="cline-any cline-no"> </span>
|
|
690
|
-
<span class="cline-any cline-no"> </span>
|
|
691
|
-
<span class="cline-any cline-no"> </span>
|
|
692
|
-
<span class="cline-any cline-no"> </span>
|
|
693
|
-
<span class="cline-any cline-no"> </span>
|
|
694
|
-
<span class="cline-any cline-no"> </span>
|
|
695
|
-
<span class="cline-any cline-no"> </span>
|
|
696
|
-
<span class="cline-any cline-no"> </span>
|
|
697
|
-
<span class="cline-any cline-no"> </span>
|
|
698
|
-
<span class="cline-any cline-no"> </span>
|
|
699
|
-
<span class="cline-any cline-no"> </span>
|
|
700
|
-
<span class="cline-any cline-no"> </span>
|
|
701
|
-
<span class="cline-any cline-no"> </span>
|
|
702
|
-
<span class="cline-any cline-no"> </span>
|
|
703
|
-
<span class="cline-any cline-no"> </span>
|
|
704
|
-
<span class="cline-any cline-no"> </span>
|
|
705
|
-
<span class="cline-any cline-no"> </span>
|
|
706
|
-
<span class="cline-any cline-no"> </span>
|
|
707
|
-
<span class="cline-any cline-no"> </span>
|
|
708
|
-
<span class="cline-any cline-no"> </span>
|
|
709
|
-
<span class="cline-any cline-no"> </span>
|
|
710
|
-
<span class="cline-any cline-no"> </span>
|
|
711
|
-
<span class="cline-any cline-no"> </span>
|
|
712
|
-
<span class="cline-any cline-no"> </span>
|
|
713
|
-
<span class="cline-any cline-no"> </span>
|
|
714
|
-
<span class="cline-any cline-no"> </span>
|
|
715
|
-
<span class="cline-any cline-no"> </span>
|
|
716
|
-
<span class="cline-any cline-no"> </span>
|
|
717
|
-
<span class="cline-any cline-no"> </span>
|
|
718
|
-
<span class="cline-any cline-no"> </span>
|
|
719
|
-
<span class="cline-any cline-no"> </span>
|
|
720
|
-
<span class="cline-any cline-no"> </span>
|
|
721
|
-
<span class="cline-any cline-no"> </span>
|
|
722
|
-
<span class="cline-any cline-no"> </span>
|
|
723
483
|
<span class="cline-any cline-yes">1x</span>
|
|
724
484
|
<span class="cline-any cline-yes">1x</span>
|
|
485
|
+
<span class="cline-any cline-yes">2x</span>
|
|
486
|
+
<span class="cline-any cline-yes">2x</span>
|
|
487
|
+
<span class="cline-any cline-yes">2x</span>
|
|
488
|
+
<span class="cline-any cline-yes">2x</span>
|
|
489
|
+
<span class="cline-any cline-yes">3x</span>
|
|
490
|
+
<span class="cline-any cline-yes">1x</span>
|
|
725
491
|
<span class="cline-any cline-yes">1x</span>
|
|
726
492
|
<span class="cline-any cline-no"> </span>
|
|
727
493
|
<span class="cline-any cline-no"> </span>
|
|
728
|
-
<span class="cline-any cline-
|
|
729
|
-
<span class="cline-any cline-no"> </span>
|
|
730
|
-
<span class="cline-any cline-no"> </span>
|
|
731
|
-
<span class="cline-any cline-no"> </span>
|
|
732
|
-
<span class="cline-any cline-no"> </span>
|
|
733
|
-
<span class="cline-any cline-no"> </span>
|
|
734
|
-
<span class="cline-any cline-no"> </span>
|
|
735
|
-
<span class="cline-any cline-no"> </span>
|
|
736
|
-
<span class="cline-any cline-no"> </span>
|
|
737
|
-
<span class="cline-any cline-no"> </span>
|
|
738
|
-
<span class="cline-any cline-no"> </span>
|
|
739
|
-
<span class="cline-any cline-no"> </span>
|
|
740
|
-
<span class="cline-any cline-no"> </span>
|
|
494
|
+
<span class="cline-any cline-yes">3x</span>
|
|
741
495
|
<span class="cline-any cline-yes">1x</span>
|
|
742
496
|
<span class="cline-any cline-yes">1x</span>
|
|
743
497
|
<span class="cline-any cline-yes">1x</span>
|
|
498
|
+
<span class="cline-any cline-yes">1x</span>
|
|
499
|
+
<span class="cline-any cline-yes">1x</span>
|
|
500
|
+
<span class="cline-any cline-yes">3x</span>
|
|
501
|
+
<span class="cline-any cline-yes">2x</span>
|
|
502
|
+
<span class="cline-any cline-yes">2x</span>
|
|
503
|
+
<span class="cline-any cline-yes">4x</span>
|
|
504
|
+
<span class="cline-any cline-yes">1x</span>
|
|
505
|
+
<span class="cline-any cline-yes">1x</span>
|
|
506
|
+
<span class="cline-any cline-yes">122x</span>
|
|
744
507
|
<span class="cline-any cline-no"> </span>
|
|
745
508
|
<span class="cline-any cline-no"> </span>
|
|
509
|
+
<span class="cline-any cline-yes">122x</span>
|
|
510
|
+
<span class="cline-any cline-yes">122x</span>
|
|
511
|
+
<span class="cline-any cline-yes">122x</span>
|
|
512
|
+
<span class="cline-any cline-yes">122x</span>
|
|
513
|
+
<span class="cline-any cline-yes">122x</span>
|
|
514
|
+
<span class="cline-any cline-yes">122x</span>
|
|
515
|
+
<span class="cline-any cline-yes">122x</span>
|
|
516
|
+
<span class="cline-any cline-yes">122x</span>
|
|
517
|
+
<span class="cline-any cline-yes">122x</span>
|
|
518
|
+
<span class="cline-any cline-yes">122x</span>
|
|
519
|
+
<span class="cline-any cline-yes">122x</span>
|
|
520
|
+
<span class="cline-any cline-yes">122x</span>
|
|
521
|
+
<span class="cline-any cline-yes">10x</span>
|
|
522
|
+
<span class="cline-any cline-yes">10x</span>
|
|
523
|
+
<span class="cline-any cline-yes">10x</span>
|
|
524
|
+
<span class="cline-any cline-yes">122x</span>
|
|
525
|
+
<span class="cline-any cline-yes">122x</span>
|
|
526
|
+
<span class="cline-any cline-yes">5x</span>
|
|
527
|
+
<span class="cline-any cline-yes">5x</span>
|
|
528
|
+
<span class="cline-any cline-yes">5x</span>
|
|
529
|
+
<span class="cline-any cline-yes">122x</span>
|
|
530
|
+
<span class="cline-any cline-yes">122x</span>
|
|
746
531
|
<span class="cline-any cline-no"> </span>
|
|
747
532
|
<span class="cline-any cline-no"> </span>
|
|
748
533
|
<span class="cline-any cline-no"> </span>
|
|
749
|
-
<span class="cline-any cline-
|
|
750
|
-
<span class="cline-any cline-
|
|
751
|
-
<span class="cline-any cline-
|
|
752
|
-
<span class="cline-any cline-
|
|
753
|
-
<span class="cline-any cline-
|
|
754
|
-
<span class="cline-any cline-
|
|
755
|
-
<span class="cline-any cline-
|
|
756
|
-
<span class="cline-any cline-
|
|
757
|
-
<span class="cline-any cline-
|
|
758
|
-
<span class="cline-any cline-
|
|
759
|
-
<span class="cline-any cline-
|
|
760
|
-
<span class="cline-any cline-
|
|
761
|
-
<span class="cline-any cline-
|
|
762
|
-
<span class="cline-any cline-
|
|
763
|
-
<span class="cline-any cline-
|
|
764
|
-
<span class="cline-any cline-
|
|
765
|
-
<span class="cline-any cline-
|
|
766
|
-
<span class="cline-any cline-no"> </span>
|
|
767
|
-
<span class="cline-any cline-no"> </span>
|
|
768
|
-
<span class="cline-any cline-no"> </span>
|
|
769
|
-
<span class="cline-any cline-no"> </span>
|
|
770
|
-
<span class="cline-any cline-no"> </span>
|
|
771
|
-
<span class="cline-any cline-no"> </span>
|
|
772
|
-
<span class="cline-any cline-no"> </span>
|
|
773
|
-
<span class="cline-any cline-no"> </span>
|
|
774
|
-
<span class="cline-any cline-no"> </span>
|
|
775
|
-
<span class="cline-any cline-no"> </span>
|
|
776
|
-
<span class="cline-any cline-no"> </span>
|
|
777
|
-
<span class="cline-any cline-no"> </span>
|
|
778
|
-
<span class="cline-any cline-no"> </span>
|
|
779
|
-
<span class="cline-any cline-no"> </span>
|
|
780
|
-
<span class="cline-any cline-no"> </span>
|
|
781
|
-
<span class="cline-any cline-no"> </span>
|
|
782
|
-
<span class="cline-any cline-no"> </span>
|
|
534
|
+
<span class="cline-any cline-yes">122x</span>
|
|
535
|
+
<span class="cline-any cline-yes">122x</span>
|
|
536
|
+
<span class="cline-any cline-yes">6x</span>
|
|
537
|
+
<span class="cline-any cline-yes">6x</span>
|
|
538
|
+
<span class="cline-any cline-yes">6x</span>
|
|
539
|
+
<span class="cline-any cline-yes">6x</span>
|
|
540
|
+
<span class="cline-any cline-yes">6x</span>
|
|
541
|
+
<span class="cline-any cline-yes">122x</span>
|
|
542
|
+
<span class="cline-any cline-yes">122x</span>
|
|
543
|
+
<span class="cline-any cline-yes">122x</span>
|
|
544
|
+
<span class="cline-any cline-yes">4x</span>
|
|
545
|
+
<span class="cline-any cline-yes">4x</span>
|
|
546
|
+
<span class="cline-any cline-yes">4x</span>
|
|
547
|
+
<span class="cline-any cline-yes">4x</span>
|
|
548
|
+
<span class="cline-any cline-yes">4x</span>
|
|
549
|
+
<span class="cline-any cline-yes">4x</span>
|
|
550
|
+
<span class="cline-any cline-yes">1x</span>
|
|
783
551
|
<span class="cline-any cline-yes">1x</span>
|
|
784
552
|
<span class="cline-any cline-yes">1x</span>
|
|
785
553
|
<span class="cline-any cline-no"> </span>
|
|
554
|
+
<span class="cline-any cline-yes">1x</span>
|
|
555
|
+
<span class="cline-any cline-yes">1x</span>
|
|
556
|
+
<span class="cline-any cline-yes">1x</span>
|
|
557
|
+
<span class="cline-any cline-yes">1x</span>
|
|
558
|
+
<span class="cline-any cline-yes">4x</span>
|
|
559
|
+
<span class="cline-any cline-yes">4x</span>
|
|
560
|
+
<span class="cline-any cline-yes">4x</span>
|
|
561
|
+
<span class="cline-any cline-yes">2x</span>
|
|
562
|
+
<span class="cline-any cline-yes">4x</span>
|
|
563
|
+
<span class="cline-any cline-yes">4x</span>
|
|
564
|
+
<span class="cline-any cline-yes">4x</span>
|
|
565
|
+
<span class="cline-any cline-yes">1x</span>
|
|
566
|
+
<span class="cline-any cline-yes">1x</span>
|
|
567
|
+
<span class="cline-any cline-yes">1x</span>
|
|
568
|
+
<span class="cline-any cline-yes">3x</span>
|
|
569
|
+
<span class="cline-any cline-yes">4x</span>
|
|
570
|
+
<span class="cline-any cline-yes">1x</span>
|
|
571
|
+
<span class="cline-any cline-yes">1x</span>
|
|
572
|
+
<span class="cline-any cline-yes">1x</span>
|
|
573
|
+
<span class="cline-any cline-yes">1x</span>
|
|
574
|
+
<span class="cline-any cline-yes">1x</span>
|
|
575
|
+
<span class="cline-any cline-yes">1x</span>
|
|
576
|
+
<span class="cline-any cline-yes">1x</span>
|
|
577
|
+
<span class="cline-any cline-yes">1x</span>
|
|
786
578
|
<span class="cline-any cline-no"> </span>
|
|
787
579
|
<span class="cline-any cline-no"> </span>
|
|
788
580
|
<span class="cline-any cline-no"> </span>
|
|
789
|
-
<span class="cline-any cline-
|
|
790
|
-
<span class="cline-any cline-no"> </span>
|
|
581
|
+
<span class="cline-any cline-yes">1x</span>
|
|
791
582
|
<span class="cline-any cline-no"> </span>
|
|
792
583
|
<span class="cline-any cline-no"> </span>
|
|
793
584
|
<span class="cline-any cline-no"> </span>
|
|
@@ -810,31 +601,54 @@
|
|
|
810
601
|
<span class="cline-any cline-no"> </span>
|
|
811
602
|
<span class="cline-any cline-yes">1x</span>
|
|
812
603
|
<span class="cline-any cline-yes">1x</span>
|
|
604
|
+
<span class="cline-any cline-yes">1x</span>
|
|
605
|
+
<span class="cline-any cline-yes">4x</span>
|
|
606
|
+
<span class="cline-any cline-yes">2x</span>
|
|
607
|
+
<span class="cline-any cline-yes">2x</span>
|
|
608
|
+
<span class="cline-any cline-yes">2x</span>
|
|
609
|
+
<span class="cline-any cline-yes">2x</span>
|
|
610
|
+
<span class="cline-any cline-yes">2x</span>
|
|
611
|
+
<span class="cline-any cline-yes">2x</span>
|
|
612
|
+
<span class="cline-any cline-yes">2x</span>
|
|
613
|
+
<span class="cline-any cline-yes">2x</span>
|
|
614
|
+
<span class="cline-any cline-yes">2x</span>
|
|
813
615
|
<span class="cline-any cline-no"> </span>
|
|
814
616
|
<span class="cline-any cline-no"> </span>
|
|
815
617
|
<span class="cline-any cline-no"> </span>
|
|
816
|
-
<span class="cline-any cline-
|
|
817
|
-
<span class="cline-any cline-
|
|
818
|
-
<span class="cline-any cline-
|
|
819
|
-
<span class="cline-any cline-
|
|
820
|
-
<span class="cline-any cline-
|
|
821
|
-
<span class="cline-any cline-
|
|
822
|
-
<span class="cline-any cline-
|
|
823
|
-
<span class="cline-any cline-
|
|
824
|
-
<span class="cline-any cline-
|
|
825
|
-
<span class="cline-any cline-
|
|
826
|
-
<span class="cline-any cline-
|
|
827
|
-
<span class="cline-any cline-
|
|
828
|
-
<span class="cline-any cline-
|
|
829
|
-
<span class="cline-any cline-
|
|
830
|
-
<span class="cline-any cline-
|
|
831
|
-
<span class="cline-any cline-
|
|
832
|
-
<span class="cline-any cline-
|
|
833
|
-
<span class="cline-any cline-
|
|
834
|
-
<span class="cline-any cline-
|
|
835
|
-
<span class="cline-any cline-
|
|
836
|
-
<span class="cline-any cline-
|
|
837
|
-
<span class="cline-any cline-
|
|
618
|
+
<span class="cline-any cline-yes">2x</span>
|
|
619
|
+
<span class="cline-any cline-yes">2x</span>
|
|
620
|
+
<span class="cline-any cline-yes">1x</span>
|
|
621
|
+
<span class="cline-any cline-yes">1x</span>
|
|
622
|
+
<span class="cline-any cline-yes">2x</span>
|
|
623
|
+
<span class="cline-any cline-yes">2x</span>
|
|
624
|
+
<span class="cline-any cline-yes">2x</span>
|
|
625
|
+
<span class="cline-any cline-yes">2x</span>
|
|
626
|
+
<span class="cline-any cline-yes">122x</span>
|
|
627
|
+
<span class="cline-any cline-yes">118x</span>
|
|
628
|
+
<span class="cline-any cline-yes">118x</span>
|
|
629
|
+
<span class="cline-any cline-yes">119x</span>
|
|
630
|
+
<span class="cline-any cline-yes">119x</span>
|
|
631
|
+
<span class="cline-any cline-yes">119x</span>
|
|
632
|
+
<span class="cline-any cline-yes">122x</span>
|
|
633
|
+
<span class="cline-any cline-yes">1x</span>
|
|
634
|
+
<span class="cline-any cline-yes">1x</span>
|
|
635
|
+
<span class="cline-any cline-yes">3x</span>
|
|
636
|
+
<span class="cline-any cline-yes">22x</span>
|
|
637
|
+
<span class="cline-any cline-yes">22x</span>
|
|
638
|
+
<span class="cline-any cline-yes">22x</span>
|
|
639
|
+
<span class="cline-any cline-yes">22x</span>
|
|
640
|
+
<span class="cline-any cline-yes">22x</span>
|
|
641
|
+
<span class="cline-any cline-yes">22x</span>
|
|
642
|
+
<span class="cline-any cline-yes">22x</span>
|
|
643
|
+
<span class="cline-any cline-yes">22x</span>
|
|
644
|
+
<span class="cline-any cline-yes">22x</span>
|
|
645
|
+
<span class="cline-any cline-yes">14x</span>
|
|
646
|
+
<span class="cline-any cline-yes">14x</span>
|
|
647
|
+
<span class="cline-any cline-yes">22x</span>
|
|
648
|
+
<span class="cline-any cline-yes">22x</span>
|
|
649
|
+
<span class="cline-any cline-yes">22x</span>
|
|
650
|
+
<span class="cline-any cline-yes">3x</span>
|
|
651
|
+
<span class="cline-any cline-neutral"> </span>
|
|
838
652
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import _ from 'lodash'
|
|
839
653
|
import makeDebug from 'debug'
|
|
840
654
|
import common from 'feathers-hooks-common'
|
|
@@ -845,7 +659,6 @@ import {
|
|
|
845
659
|
hasServiceAbilities, hasResourceAbilities, getQueryForAbilities,
|
|
846
660
|
Roles, RoleNames, countSubjectsForResource
|
|
847
661
|
} from '../../common/permissions.js'
|
|
848
|
-
import { isTagEqual } from '../utils.js'
|
|
849
662
|
|
|
850
663
|
const { getItems, replaceItems } = common
|
|
851
664
|
const { Forbidden } = errors
|
|
@@ -862,7 +675,7 @@ export function createJWT (options = {}) {
|
|
|
862
675
|
const accessTokens = await Promise.all(items.map(item => hook.app.getService('authentication').createAccessToken(
|
|
863
676
|
// Provided function can be used to pick or omit properties in JWT payload
|
|
864
677
|
(typeof options.payload === 'function' ? options.payload(user) : {}),
|
|
865
|
-
// Provided function can be used for custom options
|
|
678
|
+
// Provided function can be used for custom options depending on the user,
|
|
866
679
|
// then we merge with default auth options for global properties like aud, iss, etc.
|
|
867
680
|
_.merge({}, defaults, (typeof options.jwt === 'function' ? options.jwt(user) : options)))
|
|
868
681
|
))
|
|
@@ -873,13 +686,13 @@ export function createJWT (options = {}) {
|
|
|
873
686
|
}
|
|
874
687
|
}
|
|
875
688
|
|
|
876
|
-
export
|
|
877
|
-
<span class="
|
|
689
|
+
export function populateSubjects (hook) {
|
|
690
|
+
if (hook.type !== 'before') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
878
691
|
<span class="cstat-no" title="statement not covered" > throw new Error('The \'populateSubjects\' hook should only be used as a \'before\' hook.')</span>
|
|
879
692
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
693
|
+
|
|
694
|
+
return populateObjects({ serviceField: 'subjectsService', idField: 'subjects', throwOnNotFound: true })(hook)
|
|
695
|
+
}
|
|
883
696
|
|
|
884
697
|
export <span class="fstat-no" title="function not covered" >function unpopulateSubjects (hook) {</span>
|
|
885
698
|
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'after') {</span>
|
|
@@ -889,13 +702,13 @@ export <span class="fstat-no" title="function not covered" >function unpopulateS
|
|
|
889
702
|
<span class="cstat-no" title="statement not covered" > return unpopulateObjects({ serviceField: 'subjectsService', idField: 'subjects' })(hook)</span>
|
|
890
703
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
891
704
|
|
|
892
|
-
export
|
|
893
|
-
<span class="
|
|
705
|
+
export function populateResource (hook) {
|
|
706
|
+
if (hook.type !== 'before') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
894
707
|
<span class="cstat-no" title="statement not covered" > throw new Error('The \'populateResource\' hook should only be used as a \'before\' hook.')</span>
|
|
895
708
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
709
|
+
|
|
710
|
+
return populateObject({ serviceField: 'resourcesService', idField: 'resource', throwOnNotFound: true })(hook)
|
|
711
|
+
}
|
|
899
712
|
|
|
900
713
|
export <span class="fstat-no" title="function not covered" >function unpopulateResource (hook) {</span>
|
|
901
714
|
<span class="cstat-no" title="statement not covered" > if (hook.type !== 'after') {</span>
|
|
@@ -905,157 +718,160 @@ export <span class="fstat-no" title="function not covered" >function unpopulateR
|
|
|
905
718
|
<span class="cstat-no" title="statement not covered" > return unpopulateObject({ serviceField: 'resourcesService', idField: 'resource' })(hook)</span>
|
|
906
719
|
<span class="cstat-no" title="statement not covered" >}</span>
|
|
907
720
|
|
|
908
|
-
export
|
|
909
|
-
<span class="
|
|
721
|
+
export function preventEscalation (hook) {
|
|
722
|
+
if (hook.type !== 'before') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
910
723
|
<span class="cstat-no" title="statement not covered" > throw new Error('The \'preventEscalation\' hook should only be used as a \'before\' hook.')</span>
|
|
911
724
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
<span class="
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
<span class="
|
|
936
|
-
<span class="
|
|
937
|
-
<span class="
|
|
725
|
+
|
|
726
|
+
const params = hook.params
|
|
727
|
+
// If called internally we skip authorisation
|
|
728
|
+
let checkEscalation = _.has(params, 'provider')
|
|
729
|
+
debug('Escalation check ' + (checkEscalation <span class="branch-0 cbranch-no" title="branch not covered" >? 'enabled' </span>: 'disabled') + ' for provider')
|
|
730
|
+
// If explicitely asked to perform/skip, override defaults
|
|
731
|
+
if (_.has(params, 'checkEscalation')) {
|
|
732
|
+
checkEscalation = params.checkEscalation
|
|
733
|
+
debug('Escalation check ' + (checkEscalation ? 'forced' <span class="branch-0 cbranch-no" title="branch not covered" >: 'unforced')</span>)
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
if (checkEscalation) {
|
|
737
|
+
const user = params.user
|
|
738
|
+
// Make hook usable on remove as well
|
|
739
|
+
const data = hook.data || {}
|
|
740
|
+
// Make hook usable with query params as well
|
|
741
|
+
const query = params.query || {}
|
|
742
|
+
const scopeName = data.scope || query.scope // Get scope name first
|
|
743
|
+
// Retrieve the right scope on the user
|
|
744
|
+
const scope = _.get(user, scopeName, [])
|
|
745
|
+
// Then the target resource
|
|
746
|
+
const resource = _.find(scope, resource => resource._id && (resource._id.toString() === params.resource._id.toString()))
|
|
747
|
+
// Then user permission level
|
|
748
|
+
const permissions = (resource ? resource.permissions <span class="branch-0 cbranch-no" title="branch not covered" >: undefined)</span>
|
|
749
|
+
const role = (permissions ? Roles[permissions] <span class="branch-0 cbranch-no" title="branch not covered" >: undefined)</span>
|
|
750
|
+
if (_.isUndefined(role)) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
938
751
|
<span class="cstat-no" title="statement not covered" > debug('Role for authorisation not found on user for scope ' + scopeName)</span>
|
|
939
752
|
<span class="cstat-no" title="statement not covered" > throw new Forbidden('You are not allowed to change authorisation on resource')</span>
|
|
940
753
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
<span class="
|
|
953
|
-
<span class="
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
<span class="
|
|
754
|
+
|
|
755
|
+
// Check if privilege escalation might occur, if so clamp to user permission level
|
|
756
|
+
|
|
757
|
+
// Input subjects need to be checked:
|
|
758
|
+
// - on create you should not be able to change permissions on others having higher permissions than yourself
|
|
759
|
+
// (e.g. cannot change a owner into a manager when you are a manager)
|
|
760
|
+
// - on remove you should not be able to remove permissions on others having higher permissions than yourself
|
|
761
|
+
// (e.g. cannot remove a owner when you are a manager)
|
|
762
|
+
const subjects = params.subjects.filter(subject => {
|
|
763
|
+
const subjectScope = _.get(subject, scopeName, [])
|
|
764
|
+
const subjectResource = _.find(subjectScope, resource => resource._id && (resource._id.toString() === params.resource._id.toString()))
|
|
765
|
+
const subjectPermissions = (subjectResource ? subjectResource.permissions <span class="branch-0 cbranch-no" title="branch not covered" >: undefined)</span>
|
|
766
|
+
const subjectRole = (subjectPermissions ? Roles[subjectPermissions] <span class="branch-0 cbranch-no" title="branch not covered" >: undefined)</span>
|
|
767
|
+
const hasRole = !_.isUndefined(subjectRole)
|
|
768
|
+
if (hook.method === 'create') {
|
|
769
|
+
return (!hasRole || (subjectRole <= role)) // The first time no authorisation can be found
|
|
770
|
+
} else {
|
|
771
|
+
return (hasRole && (subjectRole <= role)) // Authorisation must be found on remove
|
|
772
|
+
}
|
|
773
|
+
})
|
|
774
|
+
if (subjects.length < params.subjects.length) {
|
|
775
|
+
debug(`${(params.subjects.length - subjects.length)} subjects with higher permissions level found for scope ${scopeName}`)
|
|
776
|
+
throw new Forbidden('You are not allowed to change authorisation on subject(s)')
|
|
777
|
+
}
|
|
778
|
+
// Input permissions needs to be checked since:
|
|
779
|
+
// - you should not be able to give higher permissions than your own ones to others
|
|
780
|
+
// (e.g. cannot create a owner when you are a manager)
|
|
781
|
+
let authorisationRole
|
|
782
|
+
if (data.permissions) {
|
|
783
|
+
authorisationRole = Roles[data.permissions]
|
|
784
|
+
} else if (query.permissions) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
972
785
|
<span class="cstat-no" title="statement not covered" > authorisationRole = Roles[query.permissions]</span>
|
|
973
786
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
787
|
+
if (!_.isUndefined(authorisationRole)) {
|
|
788
|
+
if (authorisationRole > role) {
|
|
789
|
+
debug('Cannot escalate with higher permissions level for scope ' + scopeName)
|
|
790
|
+
throw new Forbidden('You are not allowed to change authorisation on resource')
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
return hook
|
|
796
|
+
}
|
|
984
797
|
|
|
985
|
-
export
|
|
986
|
-
<span class="
|
|
798
|
+
export async function authorise (hook) {
|
|
799
|
+
if (hook.type !== 'before') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
987
800
|
<span class="cstat-no" title="statement not covered" > throw new Error('The \'authorise\' hook should only be used as a \'before\' hook.')</span>
|
|
988
801
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
802
|
+
const operation = hook.method
|
|
803
|
+
const resourceType = hook.service.name
|
|
804
|
+
debug('Provider is', hook.params.provider)
|
|
805
|
+
if (hook.params.user) debug('User is', hook.params.user)
|
|
806
|
+
debug('Operation is', operation)
|
|
807
|
+
if (resourceType) debug('Resource type is', resourceType)
|
|
808
|
+
|
|
809
|
+
// If called internally we skip authorisation
|
|
810
|
+
let checkAuthorisation = _.has(hook.params, 'provider')
|
|
811
|
+
debug('Access check ' + (checkAuthorisation ? 'enabled' : 'disabled') + ' for provider')
|
|
812
|
+
// If already checked we skip authorisation
|
|
813
|
+
if (hook.params.authorised) {
|
|
814
|
+
debug('Access already granted')
|
|
815
|
+
checkAuthorisation = false
|
|
816
|
+
}
|
|
817
|
+
// We also skip authorisation for built-in Feathers services like authentication
|
|
818
|
+
if (typeof hook.service.getPath !== 'function') {
|
|
819
|
+
debug('Access disabled on built-in services')
|
|
820
|
+
checkAuthorisation = false
|
|
821
|
+
}
|
|
822
|
+
// And if the authentication strategy is API key
|
|
823
|
+
if (_.get(hook, 'params.connection.authentication.strategy') === 'api') <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
1011
824
|
<span class="cstat-no" title="statement not covered" > debug('Access disabled on API keys')</span>
|
|
1012
825
|
<span class="cstat-no" title="statement not covered" > checkAuthorisation = false</span>
|
|
1013
826
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
<span class="
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
<span class="
|
|
1033
|
-
<span class="cstat-no" title="statement not covered" >
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
<span class="
|
|
827
|
+
// If explicitely asked to perform/skip, override defaults
|
|
828
|
+
if (_.has(hook.params, 'checkAuthorisation')) {
|
|
829
|
+
checkAuthorisation = _.get(hook.params, 'checkAuthorisation')
|
|
830
|
+
// Bypass authorisation for next hooks otherwise we will loop infinitely
|
|
831
|
+
delete hook.params.checkAuthorisation
|
|
832
|
+
debug('Access check ' + (checkAuthorisation ? 'forced' : 'unforced'))
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
const context = hook.service.context
|
|
836
|
+
if (checkAuthorisation) {
|
|
837
|
+
// Build ability for user
|
|
838
|
+
const authorisationService = hook.app.getService('authorisations')
|
|
839
|
+
let subject = hook.params.user
|
|
840
|
+
const payload = _.get(hook.params, 'authentication.payload')
|
|
841
|
+
const subjectId = payload && (payload.sub <span class="branch-0 cbranch-no" title="branch not covered" >|| payload.appId)</span>
|
|
842
|
+
if (payload) {
|
|
843
|
+
// If no user we allow for a stateless token with permissions inside, e.g.
|
|
844
|
+
// token targeting API gateway (sub = keyId) or app used through iframe (appId = keyId)
|
|
845
|
+
if (!subject <span class="branch-0 cbranch-no" title="branch not covered" >&& subjectId)</span> <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
846
|
+
<span class="cstat-no" title="statement not covered" > subject = Object.assign({ _id: subjectId }, payload)</span>
|
|
847
|
+
} else if (subject) { // Otherwise we allow to "extend" user abilities by providing additional information in the token
|
|
848
|
+
subject = Object.assign(subject, _.omit(payload, ['aud', 'iss', 'exp', 'sub', 'iat', 'jti', 'nbf']))
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
const abilities = await authorisationService.getAbilities(subject)
|
|
852
|
+
hook.params.abilities = abilities
|
|
853
|
+
if (hook.params.user) debug('User abilities are', abilities.rules)
|
|
854
|
+
else debug('Stateless abilities are', abilities.rules)
|
|
855
|
+
|
|
856
|
+
// Check for access to service fisrt
|
|
857
|
+
if (!hasServiceAbilities(abilities, hook.service)) {
|
|
858
|
+
debug('Service access not granted')
|
|
859
|
+
throw new Forbidden(`You are not allowed to access service ${hook.service.getPath()}`)
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
if (!hook.id) {
|
|
863
|
+
// In this specific case there is no query to be run,
|
|
864
|
+
// simply check against the object we'd like to create
|
|
865
|
+
// Support custom methods as create operation as they have similar signature
|
|
866
|
+
const DEFAULT_METHODS = ['find', 'get', 'create', 'update', 'patch', 'remove']
|
|
867
|
+
if ((operation === 'create') <span class="branch-0 cbranch-no" title="branch not covered" >|| !DEFAULT_METHODS.includes(operation))</span> {
|
|
868
|
+
const resource = hook.data
|
|
869
|
+
debug('Target resource is ', resource)
|
|
870
|
+
if (!hasResourceAbilities(abilities, operation, resourceType, context, resource)) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
1055
871
|
<span class="cstat-no" title="statement not covered" > debug('Resource access not granted')</span>
|
|
1056
872
|
<span class="cstat-no" title="statement not covered" > throw new Forbidden(`You are not allowed to perform ${operation} operation on ${resourceType}`)</span>
|
|
1057
873
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1058
|
-
<span class="
|
|
874
|
+
}<span class="branch-0 cbranch-no" title="branch not covered" > else {</span>
|
|
1059
875
|
<span class="cstat-no" title="statement not covered" > // When we find/update/patch/remove multiple items this ensures that</span>
|
|
1060
876
|
<span class="cstat-no" title="statement not covered" > // only the ones authorised by constraints on the resources will be fetched</span>
|
|
1061
877
|
<span class="cstat-no" title="statement not covered" > // This avoid fetching all first then check it one by one</span>
|
|
@@ -1068,6 +884,7 @@ export <span class="fstat-no" title="function not covered" >async function autho
|
|
|
1068
884
|
<span class="cstat-no" title="statement not covered" > _.merge(hook.params.query, dbQuery)</span>
|
|
1069
885
|
<span class="cstat-no" title="statement not covered" > } else {</span>
|
|
1070
886
|
<span class="cstat-no" title="statement not covered" > if (operation === 'find') { // You don't have right to read any items but you have access to the service so the result is empty</span>
|
|
887
|
+
<span class="cstat-no" title="statement not covered" > debug('Service access granted but no resource allowed')</span>
|
|
1071
888
|
<span class="cstat-no" title="statement not covered" > hook.result = (!_.get(hook, 'params.paginate', true) ? [] : { total: 0, skip: 0, data: [] })</span>
|
|
1072
889
|
<span class="cstat-no" title="statement not covered" > } else { // You don't have the right to update/patch/remove any items so any tentative should throw</span>
|
|
1073
890
|
<span class="cstat-no" title="statement not covered" > debug('Resource access not granted')</span>
|
|
@@ -1075,152 +892,56 @@ export <span class="fstat-no" title="function not covered" >async function autho
|
|
|
1075
892
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1076
893
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1077
894
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
895
|
+
debug('Resource access granted')
|
|
896
|
+
// Some specific services might not expose a get function, in this case we cannot check for authorisation
|
|
897
|
+
// this has to be implemented by the service itself
|
|
898
|
+
} else if (typeof hook.service.get === 'function') {
|
|
899
|
+
// In this case (single get/update/patch/remove) we need to fetch the item first
|
|
900
|
+
// Take care we might have additional query parameters to be "catched" by before hooks,
|
|
901
|
+
// however at this stage these query parameters might cause get to fail
|
|
902
|
+
const params = Object.assign({ checkAuthorisation: false }, hook.params)
|
|
903
|
+
_.unset(params, 'query')
|
|
904
|
+
const resource = await hook.service.get(hook.id, params)
|
|
905
|
+
debug('Target resource is', resource)
|
|
906
|
+
// Then check against the object we'd like to manage
|
|
907
|
+
if (!hasResourceAbilities(abilities, operation, resourceType, context, resource)) <span class="branch-0 cbranch-no" title="branch not covered" >{</span>
|
|
1091
908
|
<span class="cstat-no" title="statement not covered" > debug('Resource access not granted')</span>
|
|
1092
909
|
<span class="cstat-no" title="statement not covered" > throw new Forbidden(`You are not allowed to perform ${operation} operation on ${resourceType}`)</span>
|
|
1093
910
|
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
911
|
+
// Avoid fetching again the object in this case
|
|
912
|
+
if (operation === 'get') {
|
|
913
|
+
hook.result = resource
|
|
914
|
+
}
|
|
915
|
+
hook.params.authorised = true
|
|
916
|
+
debug('Resource access granted')
|
|
917
|
+
return hook
|
|
918
|
+
}
|
|
919
|
+
} else {
|
|
920
|
+
debug('Authorisation check skipped, access granted')
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
hook.params.authorised = true
|
|
924
|
+
return hook
|
|
925
|
+
}
|
|
1109
926
|
|
|
1110
927
|
export function updateAbilities (options = {}) {
|
|
1111
928
|
return async function (hook) {
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
<span class="
|
|
1116
|
-
|
|
1117
|
-
<span class="
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
929
|
+
const app = hook.app
|
|
930
|
+
const params = hook.params
|
|
931
|
+
const authorisationService = app.getService('authorisations')
|
|
932
|
+
let subject = (options.subjectAsItem ? getItems(hook) <span class="branch-0 cbranch-no" title="branch not covered" >: params.user)</span>
|
|
933
|
+
// Specific case of authentication result
|
|
934
|
+
if (subject && subject.user) <span class="branch-0 cbranch-no" title="branch not covered" >subject = subject.user</span>
|
|
935
|
+
// We might not have all information required eg on patch to compute new abilities,
|
|
936
|
+
// in this case we have to fetch the whole subject
|
|
937
|
+
if (options.fetchSubject) {
|
|
938
|
+
subject = await app.getService('users').get(subject._id.toString())
|
|
939
|
+
}
|
|
940
|
+
await authorisationService.updateAbilities(subject)
|
|
941
|
+
return hook
|
|
942
|
+
}
|
|
1127
943
|
}
|
|
1128
944
|
|
|
1129
|
-
export <span class="fstat-no" title="function not covered" >function preventRemovingLastOwner (resourceScope) {</span>
|
|
1130
|
-
<span class="cstat-no" title="statement not covered" > return async function (hook) {</span>
|
|
1131
|
-
<span class="cstat-no" title="statement not covered" > // By pass check ?</span>
|
|
1132
|
-
<span class="cstat-no" title="statement not covered" > if (hook.params.force) return hook</span>
|
|
1133
|
-
<span class="cstat-no" title="statement not covered" > const params = hook.params</span>
|
|
1134
|
-
<span class="cstat-no" title="statement not covered" > const data = hook.data || {}</span>
|
|
1135
|
-
<span class="cstat-no" title="statement not covered" > const query = params.query || {}</span>
|
|
1136
|
-
<span class="cstat-no" title="statement not covered" > const scope = data.scope || query.scope</span>
|
|
1137
|
-
<span class="cstat-no" title="statement not covered" > const grantedPermissions = data.permissions || query.permissions</span>
|
|
1138
|
-
<span class="cstat-no" title="statement not covered" > const grantedRole = (grantedPermissions ? Roles[grantedPermissions] : undefined)</span>
|
|
1139
|
-
<span class="cstat-no" title="statement not covered" > const resource = hook.params.resource</span>
|
|
1140
|
-
<span class="cstat-no" title="statement not covered" > const subjects = hook.params.subjects</span>
|
|
1141
|
-
<span class="cstat-no" title="statement not covered" > const subjectService = hook.params.subjectsService</span>
|
|
1142
|
-
<span class="cstat-no" title="statement not covered" > // On create check if we try to downgrade permissions otherwise let pass through</span>
|
|
1143
|
-
<span class="cstat-no" title="statement not covered" > if (!_.isUndefined(grantedRole) && (grantedRole === Roles.owner)) return hook</span>
|
|
1144
|
-
<span class="cstat-no" title="statement not covered" ></span>
|
|
1145
|
-
<span class="cstat-no" title="statement not covered" > if ((scope === resourceScope) && resource && resource._id) {</span>
|
|
1146
|
-
<span class="cstat-no" title="statement not covered" > // Count existing owners</span>
|
|
1147
|
-
<span class="cstat-no" title="statement not covered" > const owners = await countSubjectsForResource(subjectService, resourceScope, resource._id, Roles.owner)</span>
|
|
1148
|
-
<span class="cstat-no" title="statement not covered" > // Now count owners we change/remove permissions on</span>
|
|
1149
|
-
<span class="cstat-no" title="statement not covered" > const removedOwners = subjects.reduce((count, subject) => {</span>
|
|
1150
|
-
<span class="cstat-no" title="statement not covered" > const resources = _.get(subject, resourceScope, [])</span>
|
|
1151
|
-
<span class="cstat-no" title="statement not covered" > const ownedResource = _.find(resources, { _id: resource._id, permissions: RoleNames[Roles.owner] })</span>
|
|
1152
|
-
<span class="cstat-no" title="statement not covered" > return (ownedResource ? count + 1 : count)</span>
|
|
1153
|
-
<span class="cstat-no" title="statement not covered" > }, 0)</span>
|
|
1154
|
-
<span class="cstat-no" title="statement not covered" > // If none remains stop</span>
|
|
1155
|
-
<span class="cstat-no" title="statement not covered" > if (removedOwners >= owners.total) {</span>
|
|
1156
|
-
<span class="cstat-no" title="statement not covered" > debug('Cannot remove the last owner of resource ', resource)</span>
|
|
1157
|
-
<span class="cstat-no" title="statement not covered" > const resourceName = resource.name ? resource.name : resource._id.toString()</span>
|
|
1158
|
-
<span class="cstat-no" title="statement not covered" > throw new Forbidden('You are not allowed to remove the last owner of resource ' + resourceName, {</span>
|
|
1159
|
-
<span class="cstat-no" title="statement not covered" > translation: {</span>
|
|
1160
|
-
<span class="cstat-no" title="statement not covered" > key: 'CANNOT_REMOVE_LAST_OWNER',</span>
|
|
1161
|
-
<span class="cstat-no" title="statement not covered" > params: { resource: resourceName }</span>
|
|
1162
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1163
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
1164
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1165
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1166
|
-
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
1167
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1168
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1169
|
-
|
|
1170
|
-
export <span class="fstat-no" title="function not covered" >async function removeOrganisationGroupsAuthorisations (hook) {</span>
|
|
1171
|
-
<span class="cstat-no" title="statement not covered" > const app = hook.app</span>
|
|
1172
|
-
<span class="cstat-no" title="statement not covered" > const authorisationService = app.getService('authorisations')</span>
|
|
1173
|
-
<span class="cstat-no" title="statement not covered" > const org = hook.params.resource</span>
|
|
1174
|
-
<span class="cstat-no" title="statement not covered" > const user = hook.params.user</span>
|
|
1175
|
-
<span class="cstat-no" title="statement not covered" > // Unset membership for the all org groups</span>
|
|
1176
|
-
<span class="cstat-no" title="statement not covered" > const orgGroupService = app.getService('groups', org)</span>
|
|
1177
|
-
<span class="cstat-no" title="statement not covered" > const groups = await orgGroupService.find({ paginate: false })</span>
|
|
1178
|
-
<span class="cstat-no" title="statement not covered" > await Promise.all(groups.map(group => {</span>
|
|
1179
|
-
<span class="cstat-no" title="statement not covered" > // Unset membership on group for the all org users</span>
|
|
1180
|
-
<span class="cstat-no" title="statement not covered" > return authorisationService.remove(group._id.toString(), {</span>
|
|
1181
|
-
<span class="cstat-no" title="statement not covered" > query: {</span>
|
|
1182
|
-
<span class="cstat-no" title="statement not covered" > scope: 'groups'</span>
|
|
1183
|
-
<span class="cstat-no" title="statement not covered" > },</span>
|
|
1184
|
-
<span class="cstat-no" title="statement not covered" > user,</span>
|
|
1185
|
-
<span class="cstat-no" title="statement not covered" > force: hook.params.force,</span>
|
|
1186
|
-
<span class="cstat-no" title="statement not covered" > // Because we already have resource set it as objects to avoid populating</span>
|
|
1187
|
-
<span class="cstat-no" title="statement not covered" > // Moreover used as an after hook the resource might not already exist anymore</span>
|
|
1188
|
-
<span class="cstat-no" title="statement not covered" > subjects: hook.params.subjects,</span>
|
|
1189
|
-
<span class="cstat-no" title="statement not covered" > subjectsService: hook.params.subjectsService,</span>
|
|
1190
|
-
<span class="cstat-no" title="statement not covered" > resource: group,</span>
|
|
1191
|
-
<span class="cstat-no" title="statement not covered" > resourcesService: orgGroupService</span>
|
|
1192
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
1193
|
-
<span class="cstat-no" title="statement not covered" > }))</span>
|
|
1194
|
-
<span class="cstat-no" title="statement not covered" > debug('Authorisations unset on groups for organisation ' + org._id)</span>
|
|
1195
|
-
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
1196
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1197
|
-
|
|
1198
|
-
export <span class="fstat-no" title="function not covered" >async function removeOrganisationTagsAuthorisations (hook) {</span>
|
|
1199
|
-
<span class="cstat-no" title="statement not covered" > const app = hook.app</span>
|
|
1200
|
-
<span class="cstat-no" title="statement not covered" > const org = hook.params.resource</span>
|
|
1201
|
-
<span class="cstat-no" title="statement not covered" > const subjectService = hook.params.subjectsService</span>
|
|
1202
|
-
<span class="cstat-no" title="statement not covered" > const orgTagsService = app.getService('tags', org)</span>
|
|
1203
|
-
<span class="cstat-no" title="statement not covered" > const subjects = hook.params.subjects || []</span>
|
|
1204
|
-
<span class="cstat-no" title="statement not covered" > if (subjects.length === 0) return hook</span>
|
|
1205
|
-
<span class="cstat-no" title="statement not covered" > // Retrieve org tags</span>
|
|
1206
|
-
<span class="cstat-no" title="statement not covered" > const orgTags = await orgTagsService.find({ paginate: false })</span>
|
|
1207
|
-
<span class="cstat-no" title="statement not covered" > const promises = []</span>
|
|
1208
|
-
<span class="cstat-no" title="statement not covered" > subjects.forEach(subject => {</span>
|
|
1209
|
-
<span class="cstat-no" title="statement not covered" > const tags = subject.tags || []</span>
|
|
1210
|
-
<span class="cstat-no" title="statement not covered" > // Find tags from org</span>
|
|
1211
|
-
<span class="cstat-no" title="statement not covered" > const fromOrg = _.intersectionWith(tags, orgTags, isTagEqual)</span>
|
|
1212
|
-
<span class="cstat-no" title="statement not covered" > // Clear removed tags</span>
|
|
1213
|
-
<span class="cstat-no" title="statement not covered" > const notFromOrg = _.differenceWith(tags, orgTags, isTagEqual)</span>
|
|
1214
|
-
<span class="cstat-no" title="statement not covered" > // Update subject if required</span>
|
|
1215
|
-
<span class="cstat-no" title="statement not covered" > if (fromOrg.length > 0) {</span>
|
|
1216
|
-
<span class="cstat-no" title="statement not covered" > promises.push(subjectService.patch(subject._id.toString(), { tags: notFromOrg }))</span>
|
|
1217
|
-
<span class="cstat-no" title="statement not covered" > }</span>
|
|
1218
|
-
<span class="cstat-no" title="statement not covered" > })</span>
|
|
1219
|
-
<span class="cstat-no" title="statement not covered" > // Perform subject updates in parallel</span>
|
|
1220
|
-
<span class="cstat-no" title="statement not covered" > await Promise.all(promises)</span>
|
|
1221
|
-
<span class="cstat-no" title="statement not covered" > debug(`Tags unset on ${promises.length} subjects for organisation ` + org._id)</span>
|
|
1222
|
-
<span class="cstat-no" title="statement not covered" > return hook</span>
|
|
1223
|
-
<span class="cstat-no" title="statement not covered" >}</span>
|
|
1224
945
|
</pre></td></tr></table></pre>
|
|
1225
946
|
|
|
1226
947
|
<div class='push'></div><!-- for sticky footer -->
|
|
@@ -1228,7 +949,7 @@ export <span class="fstat-no" title="function not covered" >async function remov
|
|
|
1228
949
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1229
950
|
Code coverage generated by
|
|
1230
951
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1231
|
-
at
|
|
952
|
+
at 2026-03-10T09:15:24.774Z
|
|
1232
953
|
</div>
|
|
1233
954
|
<script src="../../../prettify.js"></script>
|
|
1234
955
|
<script>
|