Account deleted flag
This commit is contained in:
@@ -691,6 +691,29 @@ export const AdminForm = ({
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{user.isDeleted && (
|
||||||
|
<div role="alert" className="alert alert-warning alert-outline flex flex-col">
|
||||||
|
<div className="flex items-center gap-2">
|
||||||
|
<TriangleAlert />
|
||||||
|
{openBans.map((ban) => (
|
||||||
|
<div key={ban.id}>
|
||||||
|
<h3 className="text-lg font-semibold">Account gelöscht</h3>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
{openTimebans.map((timeban) => (
|
||||||
|
<div key={timeban.id}>
|
||||||
|
<h3 className="text-lg font-semibold">
|
||||||
|
Dieser Account ist als gelöscht markiert, der Nutzer kann sich nicht mehr
|
||||||
|
anmelden.
|
||||||
|
</h3>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
<p className="text-sm text-gray-400">
|
||||||
|
Achtung! Die Strafe(n) sind aktiv, die Rechte des Nutzers müssen nicht angepasst werden!
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{(user.CanonicalUser || (user.Duplicates && user.Duplicates.length > 0)) && (
|
{(user.CanonicalUser || (user.Duplicates && user.Duplicates.length > 0)) && (
|
||||||
<div role="alert" className="alert alert-error alert-outline flex flex-col">
|
<div role="alert" className="alert alert-error alert-outline flex flex-col">
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
|
|||||||
@@ -63,6 +63,9 @@ const AdminUserPage = () => {
|
|||||||
if (activePenaltys.length > 0) {
|
if (activePenaltys.length > 0) {
|
||||||
return <span className="font-bold text-red-600">AKTIVE STRAFE</span>;
|
return <span className="font-bold text-red-600">AKTIVE STRAFE</span>;
|
||||||
}
|
}
|
||||||
|
if (props.row.original.isDeleted) {
|
||||||
|
return <span className="font-bold text-yellow-600">GELÖSCHT</span>;
|
||||||
|
}
|
||||||
if (props.row.original.permissions.length === 0) {
|
if (props.row.original.permissions.length === 0) {
|
||||||
return <span className="text-gray-700">Keine</span>;
|
return <span className="text-gray-700">Keine</span>;
|
||||||
} else if (props.row.original.permissions.includes("ADMIN_USER_ADVANCED")) {
|
} else if (props.row.original.permissions.includes("ADMIN_USER_ADVANCED")) {
|
||||||
|
|||||||
@@ -4,14 +4,14 @@ model Log {
|
|||||||
userId String?
|
userId String?
|
||||||
browser String?
|
browser String?
|
||||||
deviceId String?
|
deviceId String?
|
||||||
ip String?
|
ip String?
|
||||||
field String?
|
field String?
|
||||||
oldValue String?
|
oldValue String?
|
||||||
newValue String?
|
newValue String?
|
||||||
timestamp DateTime @default(now())
|
timestamp DateTime @default(now())
|
||||||
|
|
||||||
|
|
||||||
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
User User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||||
|
|
||||||
@@map(name: "logs")
|
@@map(name: "logs")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -19,4 +19,5 @@ enum LOG_TYPE {
|
|||||||
LOGIN
|
LOGIN
|
||||||
PROFILE_CHANGE
|
PROFILE_CHANGE
|
||||||
REGISTER
|
REGISTER
|
||||||
}
|
ACCOUNT_DELETED
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user