From 582b3b9183def0d9ea5f7b68ecde677d0cf6a777 Mon Sep 17 00:00:00 2001 From: kayra1 Date: Thu, 1 Aug 2024 14:27:42 +0300 Subject: [PATCH] allow admin to change everyones passwords --- ui/src/app/aside.tsx | 4 +- ui/src/app/certificate_requests/asideForm.tsx | 1 + ui/src/app/change_password/page.tsx | 9 +- ui/src/app/nav.tsx | 8 +- ui/src/app/queries.ts | 19 +- ui/src/app/users/asideForm.tsx | 199 +++++++++++++----- ui/src/app/users/row.tsx | 2 +- ui/src/app/users/table.tsx | 5 +- ui/src/app/utils.ts | 1 - 9 files changed, 177 insertions(+), 71 deletions(-) diff --git a/ui/src/app/aside.tsx b/ui/src/app/aside.tsx index 0615c0c..59f95a6 100644 --- a/ui/src/app/aside.tsx +++ b/ui/src/app/aside.tsx @@ -1,4 +1,5 @@ import { SetStateAction, Dispatch, createContext, useContext, ComponentType } from "react" +import { useAuth } from "./auth/authContext" type AsideContextType = { isOpen: boolean, @@ -17,9 +18,10 @@ export const AsideContext = createContext({ }) export function Aside({ FormComponent }: { FormComponent: React.ComponentType }) { + const auth = useAuth() const asideContext = useContext(AsideContext) return ( -