diff --git a/package.json b/package.json
index 5cf6898..cf403cd 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,8 @@
"@quasar/extras": "^1.16.9",
"@vueuse/router": "^10.7.2",
"cookie": "^0.6.0",
+ "fast-password-entropy": "^1.1.1",
+ "hibp": "^14.1.2",
"moment": "^2.30.1",
"openapi-fetch": "^0.8.2",
"pinia": "^2.1.7",
diff --git a/src/components/identityForm/actions.vue b/src/components/identityForm/actions.vue
index ac83596..f98f3cc 100644
--- a/src/components/identityForm/actions.vue
+++ b/src/components/identityForm/actions.vue
@@ -11,8 +11,13 @@ div.flex
label="Activation"
v-model="props.identity.dataStatus"
:true-value="1"
- :false-value="0"
+ :indeterminate-value="-2"
+ :false-value="-3"
)
+ q-btn.q-mx-xs( @click="forceChangePassword()" color="orange-8" icon="mdi-lock-reset" :disabled="props.identity.state != IdentityState.SYNCED")
+ q-tooltip.text-body2(slot="trigger") Obliger l'utilisateur à changer son mot de passe
+ q-btn.q-mx-xs(@click="resetPasswordModal = true" color="red-8" icon="mdi-account-key" :disabled="props.identity.state != IdentityState.SYNCED")
+ q-tooltip.text-body2(slot="trigger") Définir le mot de passe
q-btn.q-mx-xs(@click="sendInit" color="primary" icon="mdi-email-arrow-right" :disabled="props.identity.state != IdentityState.SYNCED")
q-tooltip.text-body2(slot="trigger") Envoyer le mail d'invitation
q-btn.q-mx-xs(@click="submit" color="positive" icon="mdi-check" v-show="!isNew" v-if="crud.update")
@@ -24,6 +29,15 @@ div.flex
q-tooltip.text-body2(slot="trigger") Voir les logs de l'identité
q-btn.q-mx-xs(v-if="props.identity?._id" @click="deleteIdentity" color="negative" icon="mdi-delete")
q-tooltip.text-body2(slot="trigger") Supprimer l'identité
+ q-dialog(v-model="resetPasswordModal" persistent medium)
+ q-card(style="width:800px")
+ q-card-section(class="text-h6 bg-primary text-white") definition du mot de passe
+ q-card-section
+ input-new-password(v-model="newpassword")
+ q-card-actions(align="right" class="bg-white text-teal")
+ q-btn( label="Abandonner" color="negative" @click="resetPasswordModal = false" )
+ q-btn( label="Sauver" color="positive" @click="doChangePassword" :disabled="newpassword === ''")
+
+
+
diff --git a/yarn.lock b/yarn.lock
index 0c11f54..4325a71 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3395,6 +3395,11 @@ fast-levenshtein@^2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==
+fast-password-entropy@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/fast-password-entropy/-/fast-password-entropy-1.1.1.tgz#47ba9933095fd5a32fb184915fc8e76ee19cf429"
+ integrity sha512-dxm29/BPFrNgyEDygg/lf9c2xQR0vnQhG7+hZjAI39M/3um9fD4xiqG6F0ZjW6bya5m9CI0u6YryHGRtxCGCiw==
+
fastq@^1.6.0:
version "1.17.1"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.17.1.tgz#2a523f07a4e7b1e81a42b91b8bf2254107753b47"
@@ -3789,6 +3794,14 @@ he@^1.2.0:
resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f"
integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==
+hibp@^14.1.2:
+ version "14.1.2"
+ resolved "https://registry.yarnpkg.com/hibp/-/hibp-14.1.2.tgz#a484b5ed24e4bd916ff0b4e63e13347545a645f7"
+ integrity sha512-DAMzWEEsjKFZMv4g8mDp1qPPo4FPmwLPhTlnJ6I1sBiC0x5FhjSyLhwvGA90uHCl8/6ckHwlgNuoinYrBCh3cQ==
+ dependencies:
+ jssha "^3.3.1"
+ undici "^6.14.1"
+
hookable@^5.5.3:
version "5.5.3"
resolved "https://registry.yarnpkg.com/hookable/-/hookable-5.5.3.tgz#6cfc358984a1ef991e2518cb9ed4a778bbd3215d"
@@ -4238,6 +4251,11 @@ jsonparse@^1.3.1:
resolved "https://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
integrity sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==
+jssha@^3.3.1:
+ version "3.3.1"
+ resolved "https://registry.yarnpkg.com/jssha/-/jssha-3.3.1.tgz#c5b7fc7fb9aa745461923b87df0e247dd59c7ea8"
+ integrity sha512-VCMZj12FCFMQYcFLPRm/0lOBbLi8uM2BhXPTqw3U4YAfs4AZfiApOoBLoN8cQE60Z50m1MYMTQVCfgF/KaCVhQ==
+
jstransformer@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/jstransformer/-/jstransformer-1.0.0.tgz#ed8bf0921e2f3f1ed4d5c1a44f68709ed24722c3"
@@ -6820,6 +6838,11 @@ undici@^5.28.2:
dependencies:
"@fastify/busboy" "^2.0.0"
+undici@^6.14.1:
+ version "6.20.1"
+ resolved "https://registry.yarnpkg.com/undici/-/undici-6.20.1.tgz#fbb87b1e2b69d963ff2d5410a40ffb4c9e81b621"
+ integrity sha512-AjQF1QsmqfJys+LXfGTNum+qw4S88CojRInG/6t31W/1fk6G59s92bnAvGz5Cmur+kQv2SURXEvvudLmbrE8QA==
+
unenv@^1.9.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/unenv/-/unenv-1.9.0.tgz#469502ae85be1bd3a6aa60f810972b1a904ca312"