diff --git a/changelog/unreleased/enhancement-change-own-password b/changelog/unreleased/enhancement-change-own-password new file mode 100644 index 00000000000..bfcd56da2f8 --- /dev/null +++ b/changelog/unreleased/enhancement-change-own-password @@ -0,0 +1,7 @@ +Enhancement: Add change own password dialog to the account info page + +We have added a new change own password dialog to the account info page, +so the user has the possibility to change their own password. + +https://github.com/owncloud/web/pull/7206 +https://github.com/owncloud/web/issues/7183 diff --git a/packages/web-client/src/index.ts b/packages/web-client/src/index.ts index 816a9f32a66..cc3d77bbe37 100644 --- a/packages/web-client/src/index.ts +++ b/packages/web-client/src/index.ts @@ -10,6 +10,7 @@ import { MeUserApiFactory, UsersApiFactory, GroupsApiFactory, + MeChangepasswordApiFactory, Group, CollectionOfGroup, CollectionOfUser, @@ -28,6 +29,7 @@ export interface Graph { getUser: (userId: string) => AxiosPromise createUser: (user: User) => AxiosPromise getMe: () => AxiosPromise + changeOwnPassword: (currentPassword: string, newPassword: string) => AxiosPromise editUser: (userId: string, user: User) => AxiosPromise deleteUser: (userId: string) => AxiosPromise listUsers: (orderBy?: string) => AxiosPromise @@ -50,6 +52,7 @@ const graph = (baseURI: string, axiosClient: AxiosInstance): Graph => { const meDrivesApi = new MeDrivesApi(config, config.basePath, axiosClient) const meUserApiFactory = MeUserApiFactory(config, config.basePath, axiosClient) + const meChangepasswordApi = MeChangepasswordApiFactory(config, config.basePath, axiosClient) const userApiFactory = UserApiFactory(config, config.basePath, axiosClient) const usersApiFactory = UsersApiFactory(config, config.basePath, axiosClient) const groupApiFactory = GroupApiFactory(config, config.basePath, axiosClient) @@ -72,6 +75,8 @@ const graph = (baseURI: string, axiosClient: AxiosInstance): Graph => { getUser: (userId: string) => userApiFactory.getUser(userId), createUser: (user: User) => usersApiFactory.createUser(user), getMe: () => meUserApiFactory.meGet(), + changeOwnPassword: (currentPassword, newPassword) => + meChangepasswordApi.changeOwnPassword({ currentPassword, newPassword }), editUser: (userId: string, user: User) => userApiFactory.updateUser(userId, user), deleteUser: (userId: string) => userApiFactory.deleteUser(userId), listUsers: (orderBy?: any) => diff --git a/packages/web-runtime/src/components/EditPasswordModal.vue b/packages/web-runtime/src/components/EditPasswordModal.vue new file mode 100644 index 00000000000..ad86cb86594 --- /dev/null +++ b/packages/web-runtime/src/components/EditPasswordModal.vue @@ -0,0 +1,78 @@ + + + diff --git a/packages/web-runtime/src/pages/account.vue b/packages/web-runtime/src/pages/account.vue index d7e370327dd..bcc3c82d146 100644 --- a/packages/web-runtime/src/pages/account.vue +++ b/packages/web-runtime/src/pages/account.vue @@ -3,6 +3,20 @@

{{ pageTitle }}

+ + + + Change Password +