Skip to content

Commit 0c66557

Browse files
committed
Feat: admin endpoint to invalidate one user's passwd
1 parent 56f6eca commit 0c66557

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/core/users/endpoints_users.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,16 @@ async def change_password(
743743
return standard_responses.Result()
744744

745745

746+
@router.post("/users/invalidate-password/{user_id}", status_code=201)
747+
async def invalidate_password(
748+
user_id: str,
749+
user: models_users.CoreUser = Depends(is_user_in(GroupType.admin)),
750+
db: AsyncSession = Depends(get_db),
751+
):
752+
""" """
753+
cruds_users.update_should_user_change_password_by_id(db=db, user_id=user_id)
754+
755+
746756
@router.post(
747757
"/users/migrate-mail",
748758
status_code=204,

0 commit comments

Comments
 (0)