Require user to provide current password to be able to change it

Admins can change other users' password without providing the current one, but not when changing their own
This commit is contained in:
Deluan
2021-05-03 15:03:34 -04:00
parent 5808b9fb71
commit 874b17b8f6
9 changed files with 205 additions and 11 deletions
+1 -1
View File
@@ -73,7 +73,7 @@ const authProvider = {
localStorage.getItem('token') ? Promise.resolve() : Promise.reject(),
checkError: ({ status }) => {
if (status === 401 || status === 403) {
if (status === 401) {
removeItems()
return Promise.reject()
}