🎧 Your Personal Streaming Service
Go airsonicmadsonicmedia-servermusicmusic-servernavidromeopensubsonicraspberry-piself-hostedstreamerstreaming-apistreaming-audiosubsonicsubsonic-server
Never send passwords to the UI
Deluaneaf40efdf4a7
diff --git a/model/user.go b/model/user.goindex dcb23831c..ff64a3b20 100644--- a/model/user.go+++ b/model/user.go@@ -7,13 +7,13 @@ type User struct {UserName string `json:"userName"`Name string `json:"name"`Email string `json:"email"`- Password string `json:"password"`+ Password string `json:"-"`IsAdmin bool `json:"isAdmin"`LastLoginAt *time.Time `json:"lastLoginAt"`LastAccessAt *time.Time `json:"lastAccessAt"`CreatedAt time.Time `json:"createdAt"`UpdatedAt time.Time `json:"updatedAt"`- // TODO ChangePassword string `json:"password"`+ NewPassword string `json:"password,omitempty"`}type Users []Userdiff --git a/resources/i18n/pt.json b/resources/i18n/pt.jsonindex 79b9c3129..bfe73c14d 100644--- a/resources/i18n/pt.json+++ b/resources/i18n/pt.json@@ -86,7 +86,8 @@"updatedAt": "Últ. Atualização","name": "Nome","password": "Senha",- "createdAt": "Data de Criação"+ "createdAt": "Data de Criação",+ "changePassword": "Trocar Senha"},"helperTexts": {"name": "Alterações no seu nome só serão refletidas no próximo login"diff --git a/ui/src/i18n/en.json b/ui/src/i18n/en.jsonindex fa44d6b20..f430035ab 100644--- a/ui/src/i18n/en.json+++ b/ui/src/i18n/en.json@@ -86,7 +86,8 @@"updatedAt": "Updated at","name": "Name","password": "Password",- "createdAt": "Created at"+ "createdAt": "Created at",+ "changePassword": "Change Password"},"helperTexts": {"name": "Changes to your name will only be reflected on next login"diff --git a/ui/src/user/UserEdit.js b/ui/src/user/UserEdit.jsindex 09ee6e3e3..52b4145ee 100644--- a/ui/src/user/UserEdit.js+++ b/ui/src/user/UserEdit.js@@ -61,7 +61,10 @@ const UserEdit = (props) => {{...getNameHelperText()}/><TextInput source="email" validate={[email()]} />- <PasswordInput source="password" validate={[required()]} />+ <PasswordInput+ source="password"+ label={translate('resources.user.fields.changePassword')}+ />{permissions === 'admin' && (<BooleanInput source="isAdmin" initialValue={false} />)}