admin settings
This commit is contained in:
1 parent
08887bbc58
commit
86ce30b5f4
8 files changed
+199
-46
No files matched your search
@@ -47,6 +47,8 @@ export const SettingsSwitch = () => {
|
|||||||
orgPermissions.includes("monitors.read") ||
|
orgPermissions.includes("monitors.read") ||
|
||||||
orgPermissions.includes("*");
|
orgPermissions.includes("*");
|
||||||
|
|
||||||
|
const hasMaster = orgPermissions.includes("master");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Tooltip title="Settings" placement="top">
|
<Tooltip title="Settings" placement="top">
|
||||||
@@ -85,6 +87,11 @@ export const SettingsSwitch = () => {
|
|||||||
<MenuItem onClick={() => handleClick("settings")}>
|
<MenuItem onClick={() => handleClick("settings")}>
|
||||||
<Typography>General settings</Typography>
|
<Typography>General settings</Typography>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
{hasMaster && (
|
||||||
|
<MenuItem onClick={() => handleClick("settings/admin")}>
|
||||||
|
<Typography>Admin settings</Typography>
|
||||||
|
</MenuItem>
|
||||||
|
)}
|
||||||
{hasTeamEdit && (
|
{hasTeamEdit && (
|
||||||
<MenuItem onClick={() => handleClick("teams")}>
|
<MenuItem onClick={() => handleClick("teams")}>
|
||||||
<Typography>Teams</Typography>
|
<Typography>Teams</Typography>
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ export const useInitForm = ({
|
|||||||
systemEmailRequireTLS: initialData?.systemEmailRequireTLS ?? false,
|
systemEmailRequireTLS: initialData?.systemEmailRequireTLS ?? false,
|
||||||
systemEmailRejectUnauthorized:
|
systemEmailRejectUnauthorized:
|
||||||
initialData?.systemEmailRejectUnauthorized ?? true,
|
initialData?.systemEmailRejectUnauthorized ?? true,
|
||||||
|
checksRetentionDays: initialData?.checksRetentionDays ?? 90,
|
||||||
};
|
};
|
||||||
return { defaults };
|
return { defaults };
|
||||||
}, [initialData]);
|
}, [initialData]);
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import { BasePage, ConfigBox } from "@/components/design-elements";
|
||||||
|
import {
|
||||||
|
AutoComplete,
|
||||||
|
Select,
|
||||||
|
LanguageSelector,
|
||||||
|
Button,
|
||||||
|
RadioWithDescription,
|
||||||
|
Dialog,
|
||||||
|
} from "@/components/inputs";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { SettingsForm } from "@/pages/settings/SettingsForm";
|
||||||
|
import DummyChart from "@/pages/settings/DummyChart";
|
||||||
|
|
||||||
|
import { useTheme } from "@mui/material/styles";
|
||||||
|
import { useEffect, useMemo, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { setTimezone, setMode, setChartType } from "@/features/uiSlice";
|
||||||
|
import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks";
|
||||||
|
import timezones from "@/utils/timezones.json";
|
||||||
|
import type { ITimeZone } from "@/types/timezone";
|
||||||
|
import { useGet, usePatch, usePost } from "@/hooks/UseApi";
|
||||||
|
import type { ApiResponse } from "@/hooks/UseApi";
|
||||||
|
import { z } from "zod";
|
||||||
|
import { systemSettingsSchema } from "@/validation/zod";
|
||||||
|
|
||||||
|
const AdminSettingsPage = () => {
|
||||||
|
type FormValues = z.infer<typeof systemSettingsSchema>;
|
||||||
|
|
||||||
|
const user = useAppSelector((state) => state.auth.user);
|
||||||
|
|
||||||
|
const orgPermissions = user?.org?.permissions || [];
|
||||||
|
const hasMaster = orgPermissions.includes("master");
|
||||||
|
|
||||||
|
const theme = useTheme();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const dispatch = useAppDispatch();
|
||||||
|
const timezone = useAppSelector((state) => state.ui.timezone);
|
||||||
|
const mode = useAppSelector((state) => state.ui.mode);
|
||||||
|
const chartType = useAppSelector((state) => state.ui.chartType);
|
||||||
|
const [selectedTimezone, setSelectedTimezone] = useState<ITimeZone | null>(
|
||||||
|
null
|
||||||
|
);
|
||||||
|
useEffect(() => {
|
||||||
|
const tz = timezones.find((tz) => tz._id === timezone);
|
||||||
|
setSelectedTimezone(tz || null);
|
||||||
|
}, [timezone]);
|
||||||
|
|
||||||
|
const { post, loading: posting } = usePost<Partial<FormValues>, any>();
|
||||||
|
const { patch, loading: patching } = usePatch<Partial<FormValues>, any>();
|
||||||
|
|
||||||
|
const { response, loading } = useGet<ApiResponse<any>>(
|
||||||
|
hasMaster ? "/settings" : null
|
||||||
|
);
|
||||||
|
const settings = response?.data || {};
|
||||||
|
const initialSettings = useMemo(() => settings, [settings]);
|
||||||
|
|
||||||
|
const onSubmitEmail = async (data: Partial<FormValues>) => {
|
||||||
|
const emailSettings = {
|
||||||
|
systemEmailHost: data.systemEmailHost,
|
||||||
|
systemEmailPort: data.systemEmailPort,
|
||||||
|
systemEmailAddress: data.systemEmailAddress,
|
||||||
|
systemEmailPassword: data.systemEmailPassword,
|
||||||
|
systemEmailUser: data.systemEmailUser,
|
||||||
|
systemEmailConnectionHost: data.systemEmailConnectionHost,
|
||||||
|
systemEmailTLSServername: data.systemEmailTLSServername,
|
||||||
|
systemEmailSecure: data.systemEmailSecure,
|
||||||
|
systemEmailPool: data.systemEmailPool,
|
||||||
|
systemEmailIgnoreTLS: data.systemEmailIgnoreTLS,
|
||||||
|
systemEmailRequireTLS: data.systemEmailRequireTLS,
|
||||||
|
systemEmailRejectUnauthorized: data.systemEmailRejectUnauthorized,
|
||||||
|
};
|
||||||
|
|
||||||
|
await patch("/settings/email", emailSettings);
|
||||||
|
};
|
||||||
|
|
||||||
|
const onSubmitRetention = async (data: Partial<FormValues>) => {
|
||||||
|
const { checksRetentionDays } = data;
|
||||||
|
await patch("/settings/retention", { checksRetentionDays });
|
||||||
|
};
|
||||||
|
|
||||||
|
const onTest = async (data: Partial<FormValues>) => {
|
||||||
|
const emailSettings = {
|
||||||
|
systemEmailHost: data.systemEmailHost,
|
||||||
|
systemEmailPort: data.systemEmailPort,
|
||||||
|
systemEmailAddress: data.systemEmailAddress,
|
||||||
|
systemEmailPassword: data.systemEmailPassword,
|
||||||
|
systemEmailUser: data.systemEmailUser,
|
||||||
|
systemEmailConnectionHost: data.systemEmailConnectionHost,
|
||||||
|
systemEmailTLSServername: data.systemEmailTLSServername,
|
||||||
|
systemEmailSecure: data.systemEmailSecure,
|
||||||
|
systemEmailPool: data.systemEmailPool,
|
||||||
|
systemEmailIgnoreTLS: data.systemEmailIgnoreTLS,
|
||||||
|
systemEmailRequireTLS: data.systemEmailRequireTLS,
|
||||||
|
systemEmailRejectUnauthorized: data.systemEmailRejectUnauthorized,
|
||||||
|
};
|
||||||
|
await post("/settings/test-transport", emailSettings);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BasePage>
|
||||||
|
<SettingsForm
|
||||||
|
onSubmitEmail={onSubmitEmail}
|
||||||
|
onSubmitRetention={onSubmitRetention}
|
||||||
|
onTest={onTest}
|
||||||
|
initialData={initialSettings}
|
||||||
|
loading={posting || loading || patching}
|
||||||
|
/>
|
||||||
|
</BasePage>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AdminSettingsPage;
|
||||||
@@ -11,25 +11,19 @@ import {
|
|||||||
} from "@/components/inputs";
|
} from "@/components/inputs";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { SettingsForm } from "@/pages/settings/SettingsForm";
|
|
||||||
import DummyChart from "@/pages/settings/DummyChart";
|
import DummyChart from "@/pages/settings/DummyChart";
|
||||||
|
|
||||||
import { useTheme } from "@mui/material/styles";
|
import { useTheme } from "@mui/material/styles";
|
||||||
import { useEffect, useMemo, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { setTimezone, setMode, setChartType } from "@/features/uiSlice";
|
import { setTimezone, setMode, setChartType } from "@/features/uiSlice";
|
||||||
import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks";
|
import { useAppSelector, useAppDispatch } from "@/hooks/AppHooks";
|
||||||
import timezones from "@/utils/timezones.json";
|
import timezones from "@/utils/timezones.json";
|
||||||
import type { ITimeZone } from "@/types/timezone";
|
import type { ITimeZone } from "@/types/timezone";
|
||||||
import type { SelectChangeEvent } from "@mui/material/Select";
|
import type { SelectChangeEvent } from "@mui/material/Select";
|
||||||
import { useGet, usePatch, usePost, useDelete } from "@/hooks/UseApi";
|
import { useDelete } from "@/hooks/UseApi";
|
||||||
import type { ApiResponse } from "@/hooks/UseApi";
|
|
||||||
import { z } from "zod";
|
|
||||||
import { systemSettingsSchema } from "@/validation/zod";
|
|
||||||
|
|
||||||
const SettingsPage = () => {
|
const SettingsPage = () => {
|
||||||
type FormValues = z.infer<typeof systemSettingsSchema>;
|
|
||||||
|
|
||||||
const user = useAppSelector((state) => state.auth.user);
|
const user = useAppSelector((state) => state.auth.user);
|
||||||
|
|
||||||
const orgPermissions = user?.org?.permissions || [];
|
const orgPermissions = user?.org?.permissions || [];
|
||||||
@@ -53,23 +47,8 @@ const SettingsPage = () => {
|
|||||||
setSelectedTimezone(tz || null);
|
setSelectedTimezone(tz || null);
|
||||||
}, [timezone]);
|
}, [timezone]);
|
||||||
|
|
||||||
const { post, loading: posting } = usePost<Partial<FormValues>, any>();
|
|
||||||
const { patch, loading: patching } = usePatch<Partial<FormValues>, any>();
|
|
||||||
const { deleteFn, loading: isDeleting } = useDelete();
|
const { deleteFn, loading: isDeleting } = useDelete();
|
||||||
|
|
||||||
const { response, loading } = useGet<ApiResponse<any>>(
|
|
||||||
hasMaster ? "/settings" : null
|
|
||||||
);
|
|
||||||
const settings = response?.data || {};
|
|
||||||
const initialSettings = useMemo(() => settings, [settings]);
|
|
||||||
|
|
||||||
const onSubmit = async (data: Partial<FormValues>) => {
|
|
||||||
await patch("/settings/email", data);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onTest = async (data: Partial<FormValues>) => {
|
|
||||||
await post("/settings/test-transport", data);
|
|
||||||
};
|
|
||||||
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
const [isDialogOpen, setIsDialogOpen] = useState(false);
|
||||||
|
|
||||||
const handleOpen = () => setIsDialogOpen(true);
|
const handleOpen = () => setIsDialogOpen(true);
|
||||||
@@ -151,31 +130,20 @@ const SettingsPage = () => {
|
|||||||
title="Monitors"
|
title="Monitors"
|
||||||
subtitle="Monitor related settings"
|
subtitle="Monitor related settings"
|
||||||
rightContent={
|
rightContent={
|
||||||
<Stack gap={theme.spacing(4)}>
|
|
||||||
<Stack gap={theme.spacing(4)}>
|
<Stack gap={theme.spacing(4)}>
|
||||||
<Box>
|
<Box>
|
||||||
<Button
|
<Button variant="contained" color="error" onClick={handleOpen}>
|
||||||
variant="contained"
|
|
||||||
color="error"
|
|
||||||
onClick={handleOpen}
|
|
||||||
>
|
|
||||||
Remove all monitors
|
Remove all monitors
|
||||||
</Button>
|
</Button>
|
||||||
</Box>
|
</Box>
|
||||||
</Stack>
|
<Typography>
|
||||||
|
Removes all monitors from your organization.
|
||||||
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{hasMaster && (
|
|
||||||
<SettingsForm
|
|
||||||
onSubmit={onSubmit}
|
|
||||||
onTest={onTest}
|
|
||||||
initialData={initialSettings}
|
|
||||||
loading={posting || loading || patching}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<Dialog
|
<Dialog
|
||||||
open={isDialogOpen}
|
open={isDialogOpen}
|
||||||
title={t("settings.removeAllMonitors.title", "Delete all monitors?")}
|
title={t("settings.removeAllMonitors.title", "Delete all monitors?")}
|
||||||
|
|||||||
@@ -17,12 +17,14 @@ type FormValues = z.infer<typeof systemSettingsSchema>;
|
|||||||
|
|
||||||
export const SettingsForm = ({
|
export const SettingsForm = ({
|
||||||
initialData,
|
initialData,
|
||||||
onSubmit,
|
onSubmitEmail,
|
||||||
|
onSubmitRetention,
|
||||||
onTest,
|
onTest,
|
||||||
loading,
|
loading,
|
||||||
}: {
|
}: {
|
||||||
initialData?: Partial<FormValues>;
|
initialData?: Partial<FormValues>;
|
||||||
onSubmit: SubmitHandler<FormValues>;
|
onSubmitEmail: SubmitHandler<FormValues>;
|
||||||
|
onSubmitRetention: SubmitHandler<FormValues>;
|
||||||
onTest: (data: Partial<FormValues>) => Promise<void>;
|
onTest: (data: Partial<FormValues>) => Promise<void>;
|
||||||
loading?: boolean;
|
loading?: boolean;
|
||||||
}) => {
|
}) => {
|
||||||
@@ -48,10 +50,11 @@ export const SettingsForm = ({
|
|||||||
}, [initialData, reset, defaults]);
|
}, [initialData, reset, defaults]);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
<Stack spacing={theme.spacing(10)}>
|
||||||
<Stack
|
<Stack
|
||||||
spacing={theme.spacing(10)}
|
spacing={theme.spacing(10)}
|
||||||
component="form"
|
component="form"
|
||||||
onSubmit={handleSubmit(onSubmit)}
|
onSubmit={handleSubmit(onSubmitEmail)}
|
||||||
>
|
>
|
||||||
<ConfigBox
|
<ConfigBox
|
||||||
title={t("settingsPage.emailSettings.title")}
|
title={t("settingsPage.emailSettings.title")}
|
||||||
@@ -115,7 +118,9 @@ export const SettingsForm = ({
|
|||||||
fullWidth
|
fullWidth
|
||||||
error={!!errors.systemEmailHost}
|
error={!!errors.systemEmailHost}
|
||||||
helperText={
|
helperText={
|
||||||
errors.systemEmailHost ? errors.systemEmailHost.message : ""
|
errors.systemEmailHost
|
||||||
|
? errors.systemEmailHost.message
|
||||||
|
: ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -131,7 +136,9 @@ export const SettingsForm = ({
|
|||||||
fullWidth
|
fullWidth
|
||||||
error={!!errors.systemEmailPort}
|
error={!!errors.systemEmailPort}
|
||||||
helperText={
|
helperText={
|
||||||
errors.systemEmailPort ? errors.systemEmailPort.message : ""
|
errors.systemEmailPort
|
||||||
|
? errors.systemEmailPort.message
|
||||||
|
: ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -147,7 +154,9 @@ export const SettingsForm = ({
|
|||||||
fullWidth
|
fullWidth
|
||||||
error={!!errors.systemEmailUser}
|
error={!!errors.systemEmailUser}
|
||||||
helperText={
|
helperText={
|
||||||
errors.systemEmailUser ? errors.systemEmailUser.message : ""
|
errors.systemEmailUser
|
||||||
|
? errors.systemEmailUser.message
|
||||||
|
: ""
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
@@ -320,5 +329,52 @@ export const SettingsForm = ({
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
<Stack
|
||||||
|
component="form"
|
||||||
|
onSubmit={handleSubmit(onSubmitRetention)}
|
||||||
|
spacing={theme.spacing(10)}
|
||||||
|
>
|
||||||
|
<ConfigBox
|
||||||
|
title="Global Data retention"
|
||||||
|
subtitle="Set data retention policy. This affects all organizations and teams"
|
||||||
|
rightContent={
|
||||||
|
<Stack spacing={theme.spacing(10)}>
|
||||||
|
<Controller
|
||||||
|
name="checksRetentionDays"
|
||||||
|
control={control}
|
||||||
|
render={({ field }) => (
|
||||||
|
<TextInput
|
||||||
|
{...field}
|
||||||
|
type="number"
|
||||||
|
fieldLabel="Retention days"
|
||||||
|
fullWidth
|
||||||
|
error={!!errors.checksRetentionDays}
|
||||||
|
helperText={
|
||||||
|
errors.checksRetentionDays
|
||||||
|
? errors.checksRetentionDays.message
|
||||||
|
: ""
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<Stack
|
||||||
|
gap={theme.spacing(4)}
|
||||||
|
direction="row"
|
||||||
|
justifyContent="flex-end"
|
||||||
|
>
|
||||||
|
<Button
|
||||||
|
variant="contained"
|
||||||
|
color="accent"
|
||||||
|
type="submit"
|
||||||
|
loading={loading}
|
||||||
|
>
|
||||||
|
Save retention settings
|
||||||
|
</Button>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -7,6 +7,7 @@ import UptimeCreatePage from "@/pages/uptime/UptimeCreate";
|
|||||||
import UptimeDetailsPage from "@/pages/uptime/UptimeDetails";
|
import UptimeDetailsPage from "@/pages/uptime/UptimeDetails";
|
||||||
import UptimeConfigurePage from "@/pages/uptime/UptimeConfigure";
|
import UptimeConfigurePage from "@/pages/uptime/UptimeConfigure";
|
||||||
import SettingsPage from "@/pages/settings/Settings";
|
import SettingsPage from "@/pages/settings/Settings";
|
||||||
|
import AdminSettingsPage from "@/pages/settings/AdminSettings";
|
||||||
import TeamsPage from "@/pages/teams/Teams";
|
import TeamsPage from "@/pages/teams/Teams";
|
||||||
import TeamsCreatePage from "@/pages/teams/TeamsCreate";
|
import TeamsCreatePage from "@/pages/teams/TeamsCreate";
|
||||||
import TeamsConfigPage from "@/pages/teams/TeamsConfig";
|
import TeamsConfigPage from "@/pages/teams/TeamsConfig";
|
||||||
@@ -78,6 +79,7 @@ const Router = () => {
|
|||||||
<Route path="uptime/:id" element={<UptimeDetailsPage />} />
|
<Route path="uptime/:id" element={<UptimeDetailsPage />} />
|
||||||
<Route path="uptime" element={<UptimeMonitorsPage />} />
|
<Route path="uptime" element={<UptimeMonitorsPage />} />
|
||||||
<Route path="settings" element={<SettingsPage />} />
|
<Route path="settings" element={<SettingsPage />} />
|
||||||
|
<Route path="settings/admin" element={<AdminSettingsPage />} />
|
||||||
<Route path="teams/create" element={<TeamsCreatePage />} />
|
<Route path="teams/create" element={<TeamsCreatePage />} />
|
||||||
<Route
|
<Route
|
||||||
path="teams/:id/member/:memberId/configure"
|
path="teams/:id/member/:memberId/configure"
|
||||||
|
|||||||
@@ -291,6 +291,10 @@ export const systemSettingsSchema = z.object({
|
|||||||
systemEmailIgnoreTLS: z.boolean().optional(),
|
systemEmailIgnoreTLS: z.boolean().optional(),
|
||||||
systemEmailRequireTLS: z.boolean().optional(),
|
systemEmailRequireTLS: z.boolean().optional(),
|
||||||
systemEmailRejectUnauthorized: z.boolean().optional(),
|
systemEmailRejectUnauthorized: z.boolean().optional(),
|
||||||
|
checksRetentionDays: z.coerce
|
||||||
|
.number({ message: "Number required" })
|
||||||
|
.min(1, "Retention days must be at least 1")
|
||||||
|
.max(365, "Retention days cannot exceed 365 days"),
|
||||||
});
|
});
|
||||||
|
|
||||||
const statusPageUrlRegex = /^[A-Za-z0-9]+$/;
|
const statusPageUrlRegex = /^[A-Za-z0-9]+$/;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export interface ISystemSettings extends Document {
|
|||||||
systemEmailIgnoreTLS: boolean;
|
systemEmailIgnoreTLS: boolean;
|
||||||
systemEmailRequireTLS: boolean;
|
systemEmailRequireTLS: boolean;
|
||||||
systemEmailRejectUnauthorized: boolean;
|
systemEmailRejectUnauthorized: boolean;
|
||||||
dataRetentionDays: number;
|
checksRetentionDays: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
const SystemSettingsSchema = new Schema<ISystemSettings>(
|
const SystemSettingsSchema = new Schema<ISystemSettings>(
|
||||||
@@ -31,7 +31,7 @@ const SystemSettingsSchema = new Schema<ISystemSettings>(
|
|||||||
systemEmailIgnoreTLS: { type: Boolean, default: false },
|
systemEmailIgnoreTLS: { type: Boolean, default: false },
|
||||||
systemEmailRequireTLS: { type: Boolean, default: false },
|
systemEmailRequireTLS: { type: Boolean, default: false },
|
||||||
systemEmailRejectUnauthorized: { type: Boolean, default: true },
|
systemEmailRejectUnauthorized: { type: Boolean, default: true },
|
||||||
dataRetentionDays: { type: Number, default: 90 },
|
checksRetentionDays: { type: Number, default: 90 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
timestamps: true,
|
timestamps: true,
|
||||||
|
|||||||
Reference in new issue
Block a user