mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 05:55:44 +01:00
Add security notifications to inform about vulnerabilities (#1924)
Add security notifications in SCM-Manager to inform running instances about known security issues. These alerts can be core or plugin specific and will be shown to every user in the header. Co-authored-by: Matthias Thieroff <matthias.thieroff@cloudogu.com> Co-authored-by: Philipp Ahrendt <philipp.ahrendt@cloudogu.com> Co-authored-by: Sebastian Sdorra <sebastian.sdorra@cloudogu.com>
This commit is contained in:
@@ -24,12 +24,12 @@
|
||||
import React, { FC } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useUserSuggestions } from "@scm-manager/ui-api";
|
||||
import { NamespaceStrategies, AnonymousMode, SelectValue, ConfigChangeHandler } from "@scm-manager/ui-types";
|
||||
import { AnonymousMode, ConfigChangeHandler, NamespaceStrategies, SelectValue } from "@scm-manager/ui-types";
|
||||
import {
|
||||
AutocompleteAddEntryToTableField,
|
||||
Checkbox,
|
||||
InputField,
|
||||
MemberNameTagGroup,
|
||||
AutocompleteAddEntryToTableField,
|
||||
Select
|
||||
} from "@scm-manager/ui-components";
|
||||
import NamespaceStrategySelect from "./NamespaceStrategySelect";
|
||||
@@ -41,6 +41,7 @@ type Props = {
|
||||
dateFormat: string;
|
||||
anonymousMode: AnonymousMode;
|
||||
skipFailedAuthenticators: boolean;
|
||||
alertsUrl: string;
|
||||
releaseFeedUrl: string;
|
||||
mailDomainName: string;
|
||||
enabledXsrfProtection: boolean;
|
||||
@@ -57,6 +58,7 @@ const GeneralSettings: FC<Props> = ({
|
||||
realmDescription,
|
||||
loginInfoUrl,
|
||||
anonymousMode,
|
||||
alertsUrl,
|
||||
releaseFeedUrl,
|
||||
mailDomainName,
|
||||
enabledXsrfProtection,
|
||||
@@ -89,6 +91,9 @@ const GeneralSettings: FC<Props> = ({
|
||||
const handleNamespaceStrategyChange = (value: string) => {
|
||||
onChange(true, value, "namespaceStrategy");
|
||||
};
|
||||
const handleAlertsUrlChange = (value: string) => {
|
||||
onChange(true, value, "alertsUrl");
|
||||
};
|
||||
const handleReleaseFeedUrlChange = (value: string) => {
|
||||
onChange(true, value, "releaseFeedUrl");
|
||||
};
|
||||
@@ -207,7 +212,16 @@ const GeneralSettings: FC<Props> = ({
|
||||
</div>
|
||||
</div>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<div className="column is-half">
|
||||
<InputField
|
||||
label={t("general-settings.alerts-url")}
|
||||
onChange={handleAlertsUrlChange}
|
||||
value={alertsUrl}
|
||||
disabled={!hasUpdatePermission}
|
||||
helpText={t("help.alertsUrlHelpText")}
|
||||
/>
|
||||
</div>
|
||||
<div className="column is-half">
|
||||
<InputField
|
||||
label={t("general-settings.release-feed-url")}
|
||||
onChange={handleReleaseFeedUrlChange}
|
||||
|
||||
Reference in New Issue
Block a user