@kalisio/kdk 2.1.1 → 2.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,6 +8,15 @@ import _ from 'lodash'
8
8
  const { BadRequest } = errors
9
9
  const debug = makeDebug('kdk:core:account:service')
10
10
 
11
+ class AccountService extends AuthenticationManagementService {
12
+ // add a method to verify whether en email exist or not
13
+ async verifyEmail (params) {
14
+ const usersService = this.app.getService('users')
15
+ const response = await usersService.find({ query: { email: params.email } })
16
+ return { status: response.total === 1 ? 200 : 404 }
17
+ }
18
+ }
19
+
11
20
  export default function (name, app, options) {
12
21
  // Keep track of notifier in service options
13
22
  options.notifier = async function (type, user, notifierOptions) {
@@ -94,20 +103,8 @@ export default function (name, app, options) {
94
103
 
95
104
  const servicePath = app.get('apiPath') + '/account'
96
105
  const userService = app.getService('users')
97
- /*
98
- app.configure(accountManager({
99
- // By default it is impossible to reset password if email is not verified
100
- // The problem is that if you loose your password before validating your email you are blocked,
101
- // as a consequence we release this constraint
102
- skipIsVerifiedCheck: true,
103
- service: userService.getPath(true),
104
- path: servicePath,
105
- notifier: options.notifier
106
- }))
107
-
108
- return app.service(servicePath)
109
- */
110
- return new AuthenticationManagementService(app, {
106
+
107
+ return new AccountService(app, {
111
108
  // By default it is impossible to reset password if email is not verified
112
109
  // The problem is that if you loose your password before validating your email you are blocked,
113
110
  // as a consequence we release this constraint
@@ -94,6 +94,8 @@ export default async function () {
94
94
  if (authConfig) {
95
95
  await app.createService('users', { modelsPath, servicesPath })
96
96
  debug('\'users\' service created')
97
+ await app.createService('account', { servicesPath, methods: ['create', 'verifyEmail'] })
98
+ debug('\'account\' service created')
97
99
  await app.createService('authorisations', { servicesPath })
98
100
  debug('\'authorisations\' service created')
99
101
  }
@@ -114,8 +116,6 @@ export default async function () {
114
116
  if (mailerConfig) {
115
117
  await app.createService('mailer', { servicesPath })
116
118
  debug('\'mailer\' service created')
117
- await app.createService('account', { servicesPath })
118
- debug('\'account\' service created')
119
119
  }
120
120
 
121
121
  const pushConfig = app.get('push')
@@ -30,11 +30,14 @@
30
30
  import _ from 'lodash'
31
31
  import { computed, ref } from 'vue'
32
32
  import { useRouter } from 'vue-router'
33
+ import { useQuasar } from 'quasar'
33
34
  import { i18n, utils } from '../..'
35
+ import { verifyEmail } from '../../utils/utils.account.js'
34
36
  import KScreen from '../screen/KScreen.vue'
35
37
 
36
38
  // Data
37
39
  const router = useRouter()
40
+ const $q = useQuasar()
38
41
  const formRef = ref(null)
39
42
  const message = ref(i18n.t('KSendResetPassword.MESSAGE'))
40
43
  const processing = ref(false)
@@ -69,22 +72,26 @@ const textClass = computed(() => {
69
72
  async function apply () {
70
73
  const { isValid, values } = formRef.value.validate()
71
74
  if (!isValid) return false
72
- try {
73
- processing.value = true
74
- await utils.sendResetPassword(values.email)
75
- processing.value = false
76
- router.push({ path: `reset-password/${values.email}` })
77
- } catch (error) {
78
- processing.value = false
79
- const type = _.get(error, 'errors.$className')
80
- switch (type) {
81
- case 'isVerified':
82
- message.value = i18n.t('KSendResetPassword.ERROR_MESSAGE_IS_VERIFIED')
83
- break
84
- default:
85
- message.value = i18n.t('KSendResetPassword.ERROR_MESSAGE_DEFAULT')
75
+ processing.value = true
76
+ if (await verifyEmail(values.email)) {
77
+ try {
78
+ await utils.sendResetPassword(values.email)
79
+ processing.value = false
80
+ router.push({ path: `reset-password/${values.email}` })
81
+ } catch (error) {
82
+ const type = _.get(error, 'errors.$className')
83
+ switch (type) {
84
+ case 'isVerified':
85
+ message.value = i18n.t('KSendResetPassword.ERROR_MESSAGE_IS_VERIFIED')
86
+ break
87
+ default:
88
+ message.value = i18n.t('KSendResetPassword.ERROR_MESSAGE_DEFAULT')
89
+ }
86
90
  }
91
+ } else {
92
+ $q.notify({ type: 'negative', message: i18n.t('KSendResetPassword.ERROR_INVALID_EMAIL') })
87
93
  }
88
94
  send.value = true
95
+ processing.value = false
89
96
  }
90
97
  </script>
@@ -76,7 +76,7 @@ const defaultActions = [{
76
76
  }
77
77
  }
78
78
  ]
79
- if (_.isNil(bugReport.address)) {
79
+ if (!_.isNil(bugReport.address)) {
80
80
  defaultActions.unshift({
81
81
  id: 'report-bug',
82
82
  icon: 'las la-bug',
@@ -25,10 +25,11 @@ import config from 'config'
25
25
  import { ref } from 'vue'
26
26
  import { useQuasar } from 'quasar'
27
27
  import { i18n } from '../../i18n.js'
28
+ import { login } from '../../utils/utils.session.js'
29
+ import { verifyEmail } from '../../utils/utils.account.js'
28
30
  import KScreen from './KScreen.vue'
29
31
  import KForm from '../form/KForm.vue'
30
32
  import KAction from '../KAction.vue'
31
- import { login } from '../../utils/utils.session.js'
32
33
 
33
34
  // Data
34
35
  const $q = useQuasar()
@@ -68,10 +69,15 @@ async function onLogin () {
68
69
  const result = refForm.value.validate()
69
70
  if (result.isValid) {
70
71
  loading.value = true
71
- try {
72
- await login(result.values.email, result.values.password)
73
- } catch (error) {
74
- $q.notify({ type: 'negative', message: i18n.t('KLoginScreen.LOGIN_ERROR') })
72
+ if (await verifyEmail(result.values.email)) {
73
+ try {
74
+ await login(result.values.email, result.values.password)
75
+ } catch (error) {
76
+ $q.notify({ type: 'negative', message: i18n.t('KLoginScreen.LOGIN_ERROR') })
77
+ }
78
+ }
79
+ else {
80
+ $q.notify({ type: 'negative', message: i18n.t('KLoginScreen.INVALID_EMAIL') })
75
81
  }
76
82
  loading.value = false
77
83
  }
@@ -21,6 +21,7 @@ export function useSession (options = {}) {
21
21
 
22
22
  const isInitialized = ref(false)
23
23
  let pendingReconnection = null
24
+ let pendingReload = null
24
25
 
25
26
  const User = Store.getRef('user')
26
27
 
@@ -68,6 +69,10 @@ export function useSession (options = {}) {
68
69
  }
69
70
  }
70
71
  function onReconnectError () {
72
+ // Dismiss pending reload message if any
73
+ if (pendingReload) {
74
+ pendingReload.hide()
75
+ }
71
76
  // Display it only the first time the error appears because multiple attempts will be tried
72
77
  if (!pendingReconnection) {
73
78
  logger.error(new Error('Socket has been disconnected'))
@@ -78,21 +83,37 @@ export function useSession (options = {}) {
78
83
  title: i18n.t('composables.session.ALERT'),
79
84
  message: i18n.t('composables.session.DISCONNECT'),
80
85
  html: true,
81
- persistent: true
86
+ persistent: true,
87
+ position: 'bottom'
82
88
  }).onDismiss(() => { pendingReconnection = null })
83
89
  }
84
90
  }
85
91
  function onReconnect () {
86
- // Dismiss pending reconnection error message
92
+ // Dismiss pending reconnection error message if any
87
93
  if (pendingReconnection) {
88
94
  pendingReconnection.hide()
89
95
  }
90
- // Causes problems with hot reload in dev
91
- if (Version.value.flavor !== 'dev') {
92
- Loading.show({ message: i18n.t('composables.session.RECONNECT'), html: true })
93
- setTimeout(() => { window.location.reload() }, 3000)
94
- } else {
95
- logger.error(new Error('Socket disconnected, not trying to reconnect automatically in development mode please refresh page manually'))
96
+ // Display it only the first time the reconnection occurs because multiple attempts will be tried
97
+ if (!pendingReload) {
98
+ pendingReload = $q.dialog({
99
+ title: i18n.t('composables.session.INFORMATION'),
100
+ message: i18n.t('composables.session.RECONNECT'),
101
+ html: true,
102
+ cancel: {
103
+ id: 'ignore-button',
104
+ label: i18n.t('composables.session.IGNORE'),
105
+ color: 'primary',
106
+ outline: true
107
+ },
108
+ ok: {
109
+ id: 'update-button',
110
+ label: i18n.t('composables.session.RELOAD'),
111
+ color: 'primary'
112
+ },
113
+ position: 'bottom'
114
+ })
115
+ .onOk(() => { window.location.reload() })
116
+ .onCancel(() => { pendingReload = null })
96
117
  }
97
118
  }
98
119
  function onRateLimit () {
@@ -103,7 +124,8 @@ export function useSession (options = {}) {
103
124
  ok: {
104
125
  label: i18n.t('composables.session.RETRY'),
105
126
  flat: true
106
- }
127
+ },
128
+ position: 'bottom'
107
129
  }).onOk(() => window.location.reload())
108
130
  }
109
131
 
@@ -126,10 +126,13 @@
126
126
  "VERSION_MISMATCH": "Application version mismatch, please install the latest available version or check your end point",
127
127
  "session": {
128
128
  "DISCONNECT": "The server connection has been lost, please wait until reconnection...",
129
- "RECONNECT": "We are trying to reconnect...",
129
+ "RECONNECT": "The server connection has been restaured, you can refresh the application in case data has been updated during the disconnection.",
130
+ "RELOAD": "Refresh",
130
131
  "REFUSED": "Your connection have been refused by the server, you have been disconnected...",
132
+ "IGNORE": "Ignore",
131
133
  "RETRY": "Retry",
132
- "ALERT": "Alert"
134
+ "ALERT": "Alert",
135
+ "INFORMATION": "Information"
133
136
  },
134
137
  "pwa": {
135
138
  "INSTALL_TITLE": "Install the application ?",
@@ -138,7 +141,7 @@
138
141
  "FIREFOX_DESKTOP_INSTALL_MESSAGE": "We recommend that you install the application to take full advantage of all the features. To install it, use <a href='https://addons.mozilla.org/fr/firefox/addon/pwas-for-firefox/' target='_blank'>Progressive Web Apps for Firefox</a> extension.",
139
142
  "INSTALL": "Install",
140
143
  "IGNORE": "Ignore",
141
- "UPDATE_TITLE": "Updates available",
144
+ "UPDATE_TITLE": "Update available",
142
145
  "UPDATE_MESSAGE": "To find out more consult the <a href=\"{changelog}\" target=\"_\">release note</a>",
143
146
  "UPDATE": "Update"
144
147
  }
@@ -417,6 +420,7 @@
417
420
  "LOGIN_LABEL": "Log in",
418
421
  "FORGOT_YOUR_PASSWORD_LABEL": "Forgot your password ?",
419
422
  "DONT_HAVE_AN_ACCOUNT_LABEL": "Don't have an account ?",
423
+ "INVALID_EMAIL": "Unable to find the account associated with the email entered",
420
424
  "LOGIN_ERROR": "Wrong credentials or service unavailable, please try again",
421
425
  "CONTEXTUAL_HELP": "@:NEED_HELP"
422
426
  },
@@ -773,6 +777,7 @@
773
777
  "MESSAGE": "Enter your email address and we will send you a code to reset your password",
774
778
  "ACTION": "Send",
775
779
  "EMAIL_FIELD_LABEL": "Enter your email address",
780
+ "ERROR_INVALID_EMAIL": "Unable to find the account associated to the email entered",
776
781
  "ERROR_MESSAGE_IS_VERIFIED": "Check your inbox and verify your email address first",
777
782
  "ERROR_MESSAGE_DEFAULT": "Error while sending email, please check the address and send it again or try again later"
778
783
  },
@@ -126,10 +126,13 @@
126
126
  "VERSION_MISMATCH": "Discordance de version, merci d'installer la dernière version disponible ou de vérifier votre point d'accès",
127
127
  "session": {
128
128
  "DISCONNECT": "La connexion au serveur a été interrompue, merci de patienter jusqu'à la reconnexion...",
129
- "RECONNECT": "Tentative de reconnexion en cours...",
129
+ "RECONNECT": "La connexion au serveur a été rétablie, vous pouvez refraîchir l'application si des données ont été mises à jour.",
130
+ "RELOAD": "Rafraîchir",
130
131
  "REFUSED": "Votre connexion a été refusée par le serveur, vous avez été déconnecté...",
132
+ "IGNORE": "Ignorer",
131
133
  "RETRY": "Rééssayer",
132
- "ALERT": "Alerte"
134
+ "ALERT": "Alerte",
135
+ "INFORMATION": "Information"
133
136
  },
134
137
  "pwa": {
135
138
  "INSTALL_TITLE": "Installer l'application ?",
@@ -138,8 +141,8 @@
138
141
  "FIREFOX_DESKTOP_INSTALL_MESSAGE": "Nous vous recommandons d'installer l'application pour profiter pleinement de toutes les fonctionnalites. Pour l'installer utiliser l'extension <a href='https://addons.mozilla.org/fr/firefox/addon/pwas-for-firefox/' target='_blank'>Progressive Web Apps for Firefox</a>.",
139
142
  "INSTALL": "Installer",
140
143
  "IGNORE": "Ignorer",
141
- "UPDATE_TITLE": "Mises à jour disponibles",
142
- "UPDATE_MESSAGE": "Voulez vous mettre à jour l'application ?",
144
+ "UPDATE_TITLE": "Mise à jour disponible",
145
+ "UPDATE_MESSAGE": "Pour en savoir plus consultez la <a href=\"{changelog}\">note de version</a>",
143
146
  "UPDATE": "Mettre à jour"
144
147
  }
145
148
  },
@@ -415,6 +418,7 @@
415
418
  "LOGIN_LABEL": "Se connecter",
416
419
  "FORGOT_YOUR_PASSWORD_LABEL": "Mot de passe oublié ?",
417
420
  "DONT_HAVE_AN_ACCOUNT_LABEL": "Vous n'avez pas de compte ?",
421
+ "INVALID_EMAIL": "Impossible de trouver le compte associé à l'email saisie",
418
422
  "LOGIN_ERROR": "Mauvais identifiants ou service indisponible, veuillez réessayer",
419
423
  "CONTEXTUAL_HELP": "@:NEED_HELP"
420
424
  },
@@ -758,7 +762,7 @@
758
762
  "MESSAGE": "Saisissez votre nouveau mot de passe",
759
763
  "ACTION": "Appliquer",
760
764
  "RESEND_LINK": "Renvoyer un code de réinitialisation",
761
- "EMAIL_FIELD_LABEL": "Saisissez votre adresse mail",
765
+ "EMAIL_FIELD_LABEL": "Saisissez votre adresse email",
762
766
  "PASSWORD_FIELD_LABEL": "Saisissez votre nouveau mot de passe",
763
767
  "CONFIRM_PASSWORD_FIELD_LABEL": "Confirmez votre nouveau mot de passe",
764
768
  "TOKEN_FIELD_LABEL": "Saisissez le code reçu par email",
@@ -771,9 +775,10 @@
771
775
  "TITLE": "Réinitialiser mon mot de passe ?",
772
776
  "MESSAGE": "Saisissez votre adresse email et nous vous enverrons un code pour réinitialiser votre mot de passe",
773
777
  "ACTION": "Envoyer",
774
- "EMAIL_FIELD_LABEL": "Saisissez votre adresse mail",
775
- "ERROR_MESSAGE_IS_VERIFIED": "Veuillez consulter votre messagerie et vérifier tout d'abord votre adresse mail",
776
- "ERROR_MESSAGE_DEFAULT": "Impossible d'envoyer le mail, merci de vérifier votre adresse et essayez à nouveau"
778
+ "EMAIL_FIELD_LABEL": "Saisissez votre adresse email",
779
+ "ERROR_INVALID_EMAIL": "Impossible de trouver le compte associé à l'email saisie",
780
+ "ERROR_MESSAGE_IS_VERIFIED": "Veuillez consulter votre messagerie et vérifier tout d'abord votre adresse email",
781
+ "ERROR_MESSAGE_DEFAULT": "Impossible d'envoyer l'email, merci de vérifier votre adresse et essayez à nouveau"
777
782
  },
778
783
  "KMemberFilter": {
779
784
  "NONE": "Aucun",
@@ -15,7 +15,9 @@ export default function init () {
15
15
  api.declareService('members', { context: true })
16
16
  api.declareService('groups', { context: true })
17
17
  api.declareService('storage', { context: true })
18
- api.declareService('account')
18
+ // TODO we use createService because of the custom methods
19
+ // https://github.com/kalisio/kdk/issues/781
20
+ api.createService('account', { methods: ['create', 'verifyEmail']})
19
21
 
20
22
  // Setup service for settings edition
21
23
  api.createService('settings', _.merge(config.settings || {}, {
@@ -1,5 +1,10 @@
1
1
  import { api } from '../api.js'
2
2
 
3
+ export async function verifyEmail (email) {
4
+ const response = await api.getService('account').verifyEmail({ email })
5
+ return response.status === 200 ? true : false
6
+ }
7
+
3
8
  export function resendVerifySignup (email) {
4
9
  return api.getService('account').create({
5
10
  action: 'resendVerifySignup',
@@ -51,7 +51,7 @@ export function defineUserAbilities (subject, can, cannot) {
51
51
  can('create', 'users')
52
52
  // Verification email, reset password, etc.
53
53
  can('service', 'account')
54
- can('create', 'account')
54
+ can(['create', 'verifyEmail'], 'account')
55
55
  // Allow push registration
56
56
  can('service', 'push')
57
57
  can('create', 'push')
@@ -8,12 +8,12 @@
8
8
  <!-- Filter rendering -->
9
9
  <div v-else class="row items-center q-pl-md q-pr-sm no-wrap">
10
10
  <!-- Filter toggle -->
11
- <q-toggle v-model="prop.node.isActive" :disable="layer.isDisabled" size="sm" @update:modelValue="onFilterToggled(prop.node)" />
11
+ <q-toggle v-model="prop.node.isActive" :disable="layer.isDisabled" size="xs" @update:modelValue="onFilterToggled(prop.node)" />
12
12
  <div :class="{
13
13
  'text-primary': layer.isVisible,
14
14
  'text-grey-6': layer.isDisabled
15
15
  }">
16
- {{ prop.node.label }}
16
+ {{ $tie(prop.node.label) }}
17
17
  <q-tooltip
18
18
  v-if="(prop.node.tooltip || prop.node.description) && $q.platform.is.desktop" :delay="1000"
19
19
  anchor="center left"
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div :id="id" class="full-width row items-center q-pl-md q-pr-sm no-wrap">
3
3
  <!-- Layer toggle -->
4
- <q-toggle v-model="layer.isVisible" :disable="layer.isDisabled" size="sm" @update:modelValue="onToggled" />
4
+ <q-toggle v-model="layer.isVisible" :disable="layer.isDisabled" size="xs" @update:modelValue="onToggled" />
5
5
  <!-- Layer name -->
6
6
  <div
7
7
  class="row ellipsis-2-lines"
@@ -27,7 +27,7 @@
27
27
  <q-tooltip>{{ $t('KLayersSelector.LAYER_DISABLED') }}</q-tooltip>
28
28
  </q-icon>
29
29
  <!-- Layer actions -->
30
- <k-panel
30
+ <KPanel
31
31
  :id="`${layer.name}-actions`"
32
32
  :content="layer.actions"
33
33
  :context="layer"
@@ -42,7 +42,6 @@ import { utils } from '../../../../core/client'
42
42
  import { KPanel } from '../../../../core/client/components'
43
43
 
44
44
  export default {
45
- name: 'k-layer-item',
46
45
  components: {
47
46
  KPanel
48
47
  },
@@ -3,8 +3,13 @@
3
3
  <slot name="header" />
4
4
  <div v-if="layers.length > 0">
5
5
  <template v-for="layer in layers">
6
- <component :is="layerRenderer.component" v-bind="layerRenderer.options" :layer="layer"
7
- @toggled="onLayerToggled" @filter-toggled="onLayerFilterToggled"/>
6
+ <component
7
+ :is="layerRenderer.component"
8
+ v-bind="layerRenderer.options"
9
+ :layer="layer"
10
+ @toggled="onLayerToggled"
11
+ @filter-toggled="onLayerFilterToggled"
12
+ />
8
13
  </template>
9
14
  </div>
10
15
  <div v-else-if="!options.hideIfEmpty" class="row justify-center q-pa-sm">
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div
3
- class="relative-position q-pl-md full-width row items-center no-wrap cursor-pointer"
3
+ class="relative-position q-pl-md row full-width items-center no-wrap cursor-pointer"
4
4
  v-ripple:primary
5
5
  >
6
6
  <!-- View name -->
@@ -16,7 +16,7 @@
16
16
  <q-space />
17
17
  </div>
18
18
  <!-- View favorite action -->
19
- <k-action
19
+ <KAction
20
20
  id="set-home-view"
21
21
  icon="las la-star"
22
22
  :color="item.isDefault ? 'primary' : 'grey-5'"
@@ -24,7 +24,7 @@
24
24
  :propagate="false"
25
25
  @triggered="$emit('item-selected', item, 'set-home-view')" />
26
26
  <!-- View actions -->
27
- <k-panel
27
+ <KPanel
28
28
  :id="`${item.name}-actions`"
29
29
  :content="itemActions"
30
30
  :context="item" />
@@ -1,7 +1,11 @@
1
1
  <template>
2
2
  <q-list dense bordered>
3
3
  <div class="no-padding" :style="panelStyle">
4
- <KPanel id="favorite-views-toolbar" :content="toolbar" class="no-wrap q-pl-sm q-pr-md" />
4
+ <KPanel
5
+ id="favorite-views-toolbar"
6
+ :content="toolbar"
7
+ class="no-wrap q-pl-sm q-pr-md"
8
+ />
5
9
  <KColumn
6
10
  class="q-pl-sm"
7
11
  service="catalog"
@@ -12,6 +16,7 @@
12
16
  :filter-query="filter.query"
13
17
  @selection-changed="onViewSelected"
14
18
  :height="scrollAreaMaxHeight - 100"
19
+ :width="scrollAreaMaxWidth"
15
20
  :dense="true"
16
21
  />
17
22
  </div>
@@ -3,23 +3,24 @@ export const catalogPanel = {
3
3
  panelStyle () {
4
4
  const screenHeight = this.$q.screen.height
5
5
  this.scrollAreaMaxHeight = screenHeight * 0.75 // 75vh
6
- let width = 390
6
+ this.scrollAreaMaxWidth = 390
7
7
  if (this.$q.screen.lt.sm) {
8
8
  this.scrollAreaMaxHeight = screenHeight * 0.6
9
- width = 300
9
+ this.scrollAreaMaxWidth = 300
10
10
  } else if (this.$q.screen.lt.md) {
11
11
  this.scrollAreaMaxHeight = screenHeight * 0.65
12
- width = 330
12
+ this.scrollAreaMaxWidth = 330
13
13
  } else if (this.$q.screen.lt.lg) {
14
14
  this.scrollAreaMaxHeight = screenHeight * 0.7
15
- width = 360
15
+ this.scrollAreaMaxWidth = 360
16
16
  }
17
- return `height: ${this.scrollAreaMaxHeight}px; width: ${width}px`
17
+ return `height: ${this.scrollAreaMaxHeight}px; width: ${this.scrollAreaMaxWidth}px`
18
18
  }
19
19
  },
20
20
  data () {
21
21
  return {
22
- scrollAreaMaxHeight: 0
22
+ scrollAreaMaxHeight: 0,
23
+ scrollAreaMaxWidth: 390
23
24
  }
24
25
  }
25
26
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kalisio/kdk",
3
3
  "description": "Kalisio Development Kit",
4
- "version": "2.1.1",
4
+ "version": "2.1.3",
5
5
  "homepage": "https://github.com/kalisio/kdk",
6
6
  "type": "module",
7
7
  "keywords": [
@@ -89,7 +89,7 @@
89
89
  "@feathersjs/feathers": "^5.0.8",
90
90
  "@feathersjs/schema": "^5.0.8",
91
91
  "@feathersjs/socketio": "^5.0.8",
92
- "@kalisio/feathers-s3": "^1.1.0",
92
+ "@kalisio/feathers-s3": "^1.2.0",
93
93
  "@kalisio/feathers-webpush": "^1.0.1",
94
94
  "@turf/bbox": "^6.0.1",
95
95
  "@weacast/core": "^2.1.5",
@@ -152,6 +152,11 @@ describe('core:account', () => {
152
152
  // Let enough time to process
153
153
  .timeout(15000)
154
154
 
155
+ it('check invitation email exist', async () => {
156
+ const response = await accountService.verifyEmail({ email: gmailUser })
157
+ expect(response.status).to.equal(200)
158
+ })
159
+
155
160
  it('authenticates an invited user', async () => {
156
161
  const response = await request
157
162
  .post(`${baseUrl}/authentication`)
@@ -466,6 +471,11 @@ describe('core:account', () => {
466
471
  // Let enough time to process
467
472
  .timeout(5000)
468
473
 
474
+ it('check invitation email does not exist', async () => {
475
+ const response = await accountService.verifyEmail({ email: gmailUser })
476
+ expect(response.status).to.equal(404)
477
+ })
478
+
469
479
  // Cleanup
470
480
  after(async () => {
471
481
  if (server) await server.close()
@@ -55,6 +55,9 @@ module.exports = {
55
55
  maxUsers: 1000
56
56
  }
57
57
  },
58
+ exporter: {
59
+ // nothing for now
60
+ },
58
61
  storage: {
59
62
  s3Client: {
60
63
  credentials: {
@@ -0,0 +1,22 @@
1
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
2
+ {"level":"error","message":"error: api/account - Method: create: The provided password does not comply to the password policy"}
3
+ {"level":"error","message":"error: api/tags - Method: create: You are not allowed to access service tags"}
4
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
5
+ {"level":"error","message":"error: api/users - Method: create: The provided password does not comply to the password policy"}
6
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to change authorisation on resource"}
7
+ {"level":"error","message":"error: api/authorisations - Method: remove: You are not allowed to change authorisation on subject(s)"}
8
+ {"level":"info","message":"This is a log test"}
9
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
10
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
11
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
12
+ {"level":"error","message":"error: api/service - Method: create: validation failed"}
13
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
14
+ {"level":"error","message":"error: api/storage - Method: get: The specified key does not exist."}
15
+ {"level":"error","message":"error: api/organisations - Method: create: You are not allowed to access service organisations"}
16
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
17
+ {"level":"error","message":"error: api/651d8d06bba47cea3adfb28b/storage - Method: get: You are not allowed to access service 651d8d06bba47cea3adfb28b/storage"}
18
+ {"level":"error","message":"error: api/651d8d06bba47cea3adfb28b/groups - Method: create: You are not allowed to perform create operation on groups"}
19
+ {"level":"error","message":"error: api/651d8d06bba47cea3adfb28b/groups - Method: patch: You are not allowed to perform patch operation on groups"}
20
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
21
+ {"level":"error","message":"error: api/authorisations - Method: create: You are not allowed to perform create operation on authorisations"}
22
+ {"level":"error","message":"error: api/users - Method: remove: You are not allowed to delete the user undefined"}