mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-07 22:15:45 +01:00
add rss release feed url to global config
This commit is contained in:
@@ -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).
|
||||
*/
|
||||
|
||||
@@ -47,5 +47,6 @@ export type Config = {
|
||||
enabledXsrfProtection: boolean;
|
||||
namespaceStrategy: string;
|
||||
loginInfoUrl: string;
|
||||
releaseFeedUrl: string;
|
||||
_links: Links;
|
||||
};
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -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.",
|
||||
|
||||
@@ -143,6 +143,7 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
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)}
|
||||
|
||||
@@ -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<Props> {
|
||||
realmDescription,
|
||||
loginInfoUrl,
|
||||
pluginUrl,
|
||||
releaseFeedUrl,
|
||||
enabledXsrfProtection,
|
||||
anonymousMode,
|
||||
namespaceStrategy,
|
||||
@@ -126,6 +128,17 @@ class GeneralSettings extends React.Component<Props> {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="columns">
|
||||
<div className="column">
|
||||
<InputField
|
||||
label={t("general-settings.release-feed-url")}
|
||||
onChange={this.handleReleaseFeedUrlChange}
|
||||
value={releaseFeedUrl}
|
||||
disabled={!hasUpdatePermission}
|
||||
helpText={t("help.releaseFeedUrlHelpText")}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -148,6 +161,9 @@ class GeneralSettings extends React.Component<Props> {
|
||||
handlePluginCenterUrlChange = (value: string) => {
|
||||
this.props.onChange(true, value, "pluginUrl");
|
||||
};
|
||||
handleReleaseFeedUrlChange = (value: string) => {
|
||||
this.props.onChange(true, value, "releaseFeedUrl");
|
||||
};
|
||||
}
|
||||
|
||||
export default withTranslation("config")(GeneralSettings);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user