[#7670] fixed password fields not being detected as changed
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
## v0.37.5 (WIP)
|
||||||
|
|
||||||
|
- Fixed password fields not being detected as changed ([#7670](https://github.com/pocketbase/pocketbase/issues/7670)).
|
||||||
|
|
||||||
|
|
||||||
## v0.37.4
|
## v0.37.4
|
||||||
|
|
||||||
- Added backups list scroll container ([#7655](https://github.com/pocketbase/pocketbase/issues/7655)).
|
- Added backups list scroll container ([#7655](https://github.com/pocketbase/pocketbase/issues/7655)).
|
||||||
|
|||||||
2
ui/.env
2
ui/.env
@@ -11,4 +11,4 @@ PB_DOCS_URL = "https://pocketbase.io/docs"
|
|||||||
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
|
PB_JS_SDK_URL = "https://github.com/pocketbase/js-sdk"
|
||||||
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
|
PB_DART_SDK_URL = "https://github.com/pocketbase/dart-sdk"
|
||||||
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
|
PB_RELEASES = "https://github.com/pocketbase/pocketbase/releases"
|
||||||
PB_VERSION = "v0.37.4"
|
PB_VERSION = "v0.37.5-dev"
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
2
ui/dist/index.html
vendored
2
ui/dist/index.html
vendored
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<!-- prism -->
|
<!-- prism -->
|
||||||
<script src="./libs/prism/prism.js" data-manual></script>
|
<script src="./libs/prism/prism.js" data-manual></script>
|
||||||
<script type="module" crossorigin src="./assets/index-BB3JTWj3.js"></script>
|
<script type="module" crossorigin src="./assets/index-76OUFdvu.js"></script>
|
||||||
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
<link rel="modulepreload" crossorigin href="./assets/pocketbase.es-B_4DUNUU.js">
|
||||||
<link rel="stylesheet" crossorigin href="./assets/index-ouas71Vg.css">
|
<link rel="stylesheet" crossorigin href="./assets/index-ouas71Vg.css">
|
||||||
</head>
|
</head>
|
||||||
|
|||||||
@@ -130,7 +130,14 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
|||||||
return serializeRecord(data.originalRecord);
|
return serializeRecord(data.originalRecord);
|
||||||
},
|
},
|
||||||
get hasChanges() {
|
get hasChanges() {
|
||||||
return data.originalRecordHash != data.recordHash;
|
return (
|
||||||
|
data.originalRecordHash != data.recordHash
|
||||||
|
// manually check the password fields as they are out of the serialized hash
|
||||||
|
|| (
|
||||||
|
data.isAuthCollection
|
||||||
|
&& (!!data.record.password || !!data.record.passwordConfirm)
|
||||||
|
)
|
||||||
|
);
|
||||||
},
|
},
|
||||||
get isFormDisabled() {
|
get isFormDisabled() {
|
||||||
return data.isLoading || data.isSaving || (!data.isNew && !data.hasChanges);
|
return data.isLoading || data.isSaving || (!data.isNew && !data.hasChanges);
|
||||||
@@ -268,7 +275,10 @@ function recordUpsertModal(collection, rawRecord, modalSettings) {
|
|||||||
|
|
||||||
function deleteInternalKeys(record) {
|
function deleteInternalKeys(record) {
|
||||||
for (let key in record) {
|
for (let key in record) {
|
||||||
if (key.startsWith("@@")) {
|
if (
|
||||||
|
key.startsWith("@@")
|
||||||
|
|| (data.isAuthCollection && (key == "password" || key == "passwordConfirm"))
|
||||||
|
) {
|
||||||
delete record[key];
|
delete record[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user