diff --git a/model/user.go b/model/user.go
index dcb23831..ff64a3b2 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 []User
diff --git a/resources/i18n/pt.json b/resources/i18n/pt.json
index 79b9c312..bfe73c14 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.json
index fa44d6b2..f430035a 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.js
index 09ee6e3e..52b4145e 100644
--- a/ui/src/user/UserEdit.js
+++ b/ui/src/user/UserEdit.js
@@ -61,7 +61,10 @@ const UserEdit = (props) => {
{...getNameHelperText()}
/>
-
+
{permissions === 'admin' && (
)}