Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Hotfix for users page not functioning (#1638)

Martin Peetersdf1c302b64bf
diff --git a/ui/app/manager/src/pages/page-account.ts b/ui/app/manager/src/pages/page-account.ts
index 1f52adde8..1e4fdb833 100644
--- a/ui/app/manager/src/pages/page-account.ts
+++ b/ui/app/manager/src/pages/page-account.ts
@@ -152,10 +152,10 @@ export class PageAccount extends Page<AppStateKeyed> {
@state()
protected _passwordPolicy: string[] = [];
- @query("#password")
+ @query("#new-password")
protected _passwordElem?: OrMwcInput;
- @query("#repeatPassword")
+ @query("#new-repeatPassword")
protected _repeatPasswordElem?: OrMwcInput;
static get styles() {
diff --git a/ui/app/manager/src/pages/page-users.ts b/ui/app/manager/src/pages/page-users.ts
index bf28f1131..a9a815029 100644
--- a/ui/app/manager/src/pages/page-users.ts
+++ b/ui/app/manager/src/pages/page-users.ts
@@ -750,8 +750,8 @@ export class PageUsers extends Page<AppStateKeyed> {
}
protected _onPasswordChanged(user: UserModel, suffix: string) {
- const passwordComponent = this.shadowRoot.getElementById("password-" + suffix) as OrMwcInput;
- const repeatPasswordComponent = this.shadowRoot.getElementById("repeatPassword-" + suffix) as OrMwcInput;
+ const passwordComponent = this.shadowRoot.getElementById("new-password-" + suffix) as OrMwcInput;
+ const repeatPasswordComponent = this.shadowRoot.getElementById("new-repeatPassword-" + suffix) as OrMwcInput;
if (repeatPasswordComponent.value !== passwordComponent.value) {
const error = i18next.t("passwordMismatch");
@@ -857,7 +857,7 @@ export class PageUsers extends Page<AppStateKeyed> {
.label="${i18next.t("username")}"
.type="${InputType.TEXT}" minLength="3" maxLength="255"
?required="${isServiceUser || !this._registrationEmailAsUsername}"
- pattern="[A-Za-z0-9\-_+@.ßçʊ]+"
+ pattern="[A-Za-z0-9_+@.\-ßçʊÇʊ]+"
.value="${user.username}" autocomplete="false"
.validationMessage="${i18next.t("invalidUsername")}"
@or-mwc-input-changed="${(e: OrInputChangedEvent) => {