diff --git a/scm-core/src/main/java/sonia/scm/config/ScmConfiguration.java b/scm-core/src/main/java/sonia/scm/config/ScmConfiguration.java index 3a69917df1..d25be6bd6c 100644 --- a/scm-core/src/main/java/sonia/scm/config/ScmConfiguration.java +++ b/scm-core/src/main/java/sonia/scm/config/ScmConfiguration.java @@ -69,6 +69,12 @@ public class ScmConfiguration implements Configuration { public static final String DEFAULT_PLUGINURL = "https://plugin-center-api.scm-manager.org/api/v1/plugins/{version}?os={os}&arch={arch}"; + /** + * SCM Manager release feed url + */ + public static final String RELEASE_FEED_URL = + "https://www.scm-manager.org/download/rss.xml"; + /** * Default url for login information (plugin and feature tips on the login page). */ diff --git a/scm-ui/ui-types/src/Config.ts b/scm-ui/ui-types/src/Config.ts index 34969fa7ee..667aa7b199 100644 --- a/scm-ui/ui-types/src/Config.ts +++ b/scm-ui/ui-types/src/Config.ts @@ -47,5 +47,6 @@ export type Config = { enabledXsrfProtection: boolean; namespaceStrategy: string; loginInfoUrl: string; + releaseFeedUrl: string; _links: Links; }; diff --git a/scm-ui/ui-webapp/public/locales/de/config.json b/scm-ui/ui-webapp/public/locales/de/config.json index 2016568fdd..cd8cd07fd0 100644 --- a/scm-ui/ui-webapp/public/locales/de/config.json +++ b/scm-ui/ui-webapp/public/locales/de/config.json @@ -46,6 +46,7 @@ }, "skip-failed-authenticators": "Fehlgeschlagene Authentifizierer überspringen", "plugin-url": "Plugin Center URL", + "release-feed-url": "Release Feed URL", "enabled-xsrf-protection": "XSRF Protection aktivieren", "namespace-strategy": "Namespace Strategie", "login-info-url": "Login Info URL" @@ -60,6 +61,7 @@ "realmDescriptionHelpText": "Beschreibung des Authentication Realm.", "dateFormatHelpText": "Moments Datumsformat. Zulässige Formate sind in der MomentJS Dokumentation beschrieben.", "pluginUrlHelpText": "Die URL der Plugin Center API. Beschreibung der Platzhalter: version = SCM-Manager Version; os = Betriebssystem; arch = Architektur", + "releaseFeedUrlHelpText": "Die URL des RSS Release Feed des SCM-Manager. Damit kann über neuere Versionen informiert werden.", "enableForwardingHelpText": "mod_proxy Port Weiterleitung aktivieren.", "disableGroupingGridHelpText": "Repository Gruppen deaktivieren. Nach einer Änderung an dieser Einstellung muss die Seite komplett neu geladen werden.", "allowAnonymousAccessHelpText": "Anonyme Benutzer haben Zugriff auf freigegebene Repositories.", diff --git a/scm-ui/ui-webapp/public/locales/en/config.json b/scm-ui/ui-webapp/public/locales/en/config.json index 6f789e747c..d56c2617fc 100644 --- a/scm-ui/ui-webapp/public/locales/en/config.json +++ b/scm-ui/ui-webapp/public/locales/en/config.json @@ -46,6 +46,7 @@ }, "skip-failed-authenticators": "Skip Failed Authenticators", "plugin-url": "Plugin Center URL", + "release-feed-url": "Release Feed URL", "enabled-xsrf-protection": "Enabled XSRF Protection", "namespace-strategy": "Namespace Strategy", "login-info-url": "Login Info URL" @@ -60,6 +61,7 @@ "realmDescriptionHelpText": "Enter authentication realm description.", "dateFormatHelpText": "Moments date format. Please have a look at the MomentJS documentation.", "pluginUrlHelpText": "The url of the Plugin Center API. Explanation of the placeholders: version = SCM-Manager Version; os = Operation System; arch = Architecture", + "releaseFeedUrlHelpText": "The url of the RSS Release Feed for SCM-Manager. This is needed to inform about newer versions.", "enableForwardingHelpText": "Enable mod_proxy port forwarding.", "disableGroupingGridHelpText": "Disable repository Groups. A complete page reload is required after a change of this value.", "allowAnonymousAccessHelpText": "Anonymous users have access on granted repositories.", diff --git a/scm-ui/ui-webapp/src/admin/components/form/ConfigForm.tsx b/scm-ui/ui-webapp/src/admin/components/form/ConfigForm.tsx index 973945b2f8..f412acf8e8 100644 --- a/scm-ui/ui-webapp/src/admin/components/form/ConfigForm.tsx +++ b/scm-ui/ui-webapp/src/admin/components/form/ConfigForm.tsx @@ -143,6 +143,7 @@ class ConfigForm extends React.Component { anonymousMode={config.anonymousMode} skipFailedAuthenticators={config.skipFailedAuthenticators} pluginUrl={config.pluginUrl} + releaseFeedUrl={config.releaseFeedUrl} enabledXsrfProtection={config.enabledXsrfProtection} namespaceStrategy={config.namespaceStrategy} onChange={(isValid, changedValue, name) => this.onChange(isValid, changedValue, name)} diff --git a/scm-ui/ui-webapp/src/admin/components/form/GeneralSettings.tsx b/scm-ui/ui-webapp/src/admin/components/form/GeneralSettings.tsx index 931e14cd4d..580a3546da 100644 --- a/scm-ui/ui-webapp/src/admin/components/form/GeneralSettings.tsx +++ b/scm-ui/ui-webapp/src/admin/components/form/GeneralSettings.tsx @@ -35,6 +35,7 @@ type Props = WithTranslation & { anonymousMode: AnonymousMode; skipFailedAuthenticators: boolean; pluginUrl: string; + releaseFeedUrl: string; enabledXsrfProtection: boolean; namespaceStrategy: string; namespaceStrategies?: NamespaceStrategies; @@ -49,6 +50,7 @@ class GeneralSettings extends React.Component { realmDescription, loginInfoUrl, pluginUrl, + releaseFeedUrl, enabledXsrfProtection, anonymousMode, namespaceStrategy, @@ -126,6 +128,17 @@ class GeneralSettings extends React.Component { /> +
+
+ +
+
); } @@ -148,6 +161,9 @@ class GeneralSettings extends React.Component { handlePluginCenterUrlChange = (value: string) => { this.props.onChange(true, value, "pluginUrl"); }; + handleReleaseFeedUrlChange = (value: string) => { + this.props.onChange(true, value, "releaseFeedUrl"); + }; } export default withTranslation("config")(GeneralSettings); diff --git a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ConfigDto.java b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ConfigDto.java index c219d61ad8..bec72a552b 100644 --- a/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ConfigDto.java +++ b/scm-webapp/src/main/java/sonia/scm/api/v2/resources/ConfigDto.java @@ -58,6 +58,7 @@ public class ConfigDto extends HalRepresentation { private boolean enabledXsrfProtection; private String namespaceStrategy; private String loginInfoUrl; + private String releaseFeedUrl; @Override @SuppressWarnings("squid:S1185") // We want to have this method available in this package