2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-12-18 18:28:18 +00:00

Auth session info (#10271)

* https://github.com/inventree/InvenTree/pull/6293

* refactor to a shared component

* refactoring container stuff to a wrapper

* move title to wrapper

* move logoff and loader to wrapper

* mvoe functions to general auth

* seperate login and register into seperate pages

* unify auth styling

* rename component

* adapt to new look

* check if registration is enabled

* feat(frontend):add authentication debug window

* clear state on logout

* add reload button

* reduce diff

* export helper

* move hover out

* only show to superusers

* fix state args

* fix merge

* fix merge

* clean up diff

* reduce diff

* re-diff

* fix shallow loading

* fix test

* fix umport

* Move session info to user settings panel

* Restrict to superuser accounts

---------

Co-authored-by: Matthias Mair <code@mjmair.com>
This commit is contained in:
Oliver
2025-09-05 16:07:32 +10:00
committed by GitHub
parent 9dadc2b475
commit 335d87ef16
5 changed files with 141 additions and 65 deletions

View File

@@ -1,5 +1,16 @@
export interface AuthContext {
status: number;
user?: {
id: number;
display: string;
has_usable_password: boolean;
username: string;
};
methods?: {
method: string;
at: number;
username: string;
}[];
data: { flows: Flow[] };
meta: { is_authenticated: boolean };
}