mirror of
https://github.com/scm-manager/scm-manager.git
synced 2026-01-19 22:12:10 +01:00
disable everything if user has no permission to edit config
This commit is contained in:
@@ -4,7 +4,8 @@ import React from "react";
|
||||
type Props = {
|
||||
label?: string,
|
||||
checked: boolean,
|
||||
onChange?: boolean => void
|
||||
onChange?: boolean => void,
|
||||
disabled?: boolean
|
||||
};
|
||||
class Checkbox extends React.Component<Props> {
|
||||
onCheckboxChange = (event: SyntheticInputEvent<HTMLInputElement>) => {
|
||||
@@ -17,11 +18,12 @@ class Checkbox extends React.Component<Props> {
|
||||
return (
|
||||
<div className="field">
|
||||
<div className="control">
|
||||
<label className="checkbox">
|
||||
<label className="checkbox" disabled={this.props.disabled}>
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={this.props.checked}
|
||||
onChange={this.onCheckboxChange}
|
||||
disabled={this.props.disabled}
|
||||
/>
|
||||
{this.props.label}
|
||||
</label>
|
||||
|
||||
@@ -12,7 +12,7 @@ type Props = {
|
||||
onReturnPressed?: () => void,
|
||||
validationError: boolean,
|
||||
errorMessage: string,
|
||||
disable?: boolean
|
||||
disabled?: boolean
|
||||
};
|
||||
|
||||
class InputField extends React.Component<Props> {
|
||||
@@ -60,7 +60,7 @@ class InputField extends React.Component<Props> {
|
||||
value,
|
||||
validationError,
|
||||
errorMessage,
|
||||
disable
|
||||
disabled
|
||||
} = this.props;
|
||||
const errorView = validationError ? "is-danger" : "";
|
||||
const helper = validationError ? (
|
||||
@@ -82,7 +82,7 @@ class InputField extends React.Component<Props> {
|
||||
value={value}
|
||||
onChange={this.handleInput}
|
||||
onKeyPress={this.handleKeyPress}
|
||||
disabled={disable}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</div>
|
||||
{helper}
|
||||
|
||||
@@ -3,11 +3,13 @@ import React from "react";
|
||||
import { DeleteButton } from "../../../components/buttons";
|
||||
import { translate } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import {InputField} from "../../../components/forms";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
groupname: string,
|
||||
removeGroup: string => void
|
||||
removeGroup: string => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
@@ -16,7 +18,7 @@ type State = {};
|
||||
|
||||
class RemoveAdminGroupButton extends React.Component<Props, State> {
|
||||
render() {
|
||||
const { t , groupname, removeGroup} = this.props;
|
||||
const { t , groupname, removeGroup, disabled} = this.props;
|
||||
return (
|
||||
<div className={classNames("is-pulled-right")}>
|
||||
<DeleteButton
|
||||
@@ -25,6 +27,7 @@ class RemoveAdminGroupButton extends React.Component<Props, State> {
|
||||
event.preventDefault();
|
||||
removeGroup(groupname);
|
||||
}}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -3,20 +3,20 @@ import React from "react";
|
||||
import { DeleteButton } from "../../../components/buttons";
|
||||
import { translate } from "react-i18next";
|
||||
import classNames from "classnames";
|
||||
import { InputField } from "../../../components/forms";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
username: string,
|
||||
removeUser: string => void
|
||||
removeUser: string => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
|
||||
|
||||
|
||||
class RemoveAdminUserButton extends React.Component<Props, State> {
|
||||
render() {
|
||||
const { t , username, removeUser} = this.props;
|
||||
const { t, username, removeUser, disabled } = this.props;
|
||||
return (
|
||||
<div className={classNames("is-pulled-right")}>
|
||||
<DeleteButton
|
||||
@@ -25,6 +25,7 @@ class RemoveAdminUserButton extends React.Component<Props, State> {
|
||||
event.preventDefault();
|
||||
removeUser(username);
|
||||
}}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -8,7 +8,7 @@ type Props = {
|
||||
t: string => string,
|
||||
proxyExcludeName: string,
|
||||
removeProxyExclude: string => void,
|
||||
disable: boolean
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
@@ -26,7 +26,7 @@ class RemoveProxyExcludeButton extends React.Component<Props, State> {
|
||||
event.preventDefault();
|
||||
removeProxyExclude(proxyExcludeName);
|
||||
}}
|
||||
disabled={this.props.disable}
|
||||
disabled={this.props.disabled}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -7,7 +7,8 @@ import InputField from "../../../components/forms/InputField";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
addGroup: string => void
|
||||
addGroup: string => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {
|
||||
@@ -25,7 +26,7 @@ class AddAdminGroupField extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, disabled } = this.props;
|
||||
return (
|
||||
<div className="field">
|
||||
<InputField
|
||||
@@ -36,10 +37,12 @@ class AddAdminGroupField extends React.Component<Props, State> {
|
||||
validationError={false}
|
||||
value={this.state.groupToAdd}
|
||||
onReturnPressed={this.appendGroup}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<AddButton
|
||||
label={t("admin-settings.add-group-button")}
|
||||
action={this.addButtonClicked}
|
||||
disabled={disabled}
|
||||
//disabled={!isMemberNameValid(this.state.memberToAdd)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -7,11 +7,12 @@ import InputField from "../../../components/forms/InputField";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
addUser: string => void
|
||||
addUser: string => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {
|
||||
userToAdd: string,
|
||||
userToAdd: string
|
||||
//validationError: boolean
|
||||
};
|
||||
|
||||
@@ -19,27 +20,28 @@ class AddAdminUserField extends React.Component<Props, State> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
userToAdd: "",
|
||||
userToAdd: ""
|
||||
//validationError: false
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, disabled } = this.props;
|
||||
return (
|
||||
<div className="field">
|
||||
<InputField
|
||||
|
||||
label={t("admin-settings.add-user-textfield")}
|
||||
errorMessage={t("admin-settings.add-user-error")}
|
||||
onChange={this.handleAddUserChange}
|
||||
validationError={false}
|
||||
value={this.state.userToAdd}
|
||||
onReturnPressed={this.appendUser}
|
||||
disabled={disabled}
|
||||
/>
|
||||
<AddButton
|
||||
label={t("admin-settings.add-user-button")}
|
||||
action={this.addButtonClicked}
|
||||
disabled={disabled}
|
||||
//disabled={!isMemberNameValid(this.state.memberToAdd)}
|
||||
/>
|
||||
</div>
|
||||
@@ -62,7 +64,7 @@ class AddAdminUserField extends React.Component<Props, State> {
|
||||
handleAddUserChange = (username: string) => {
|
||||
this.setState({
|
||||
...this.state,
|
||||
userToAdd: username,
|
||||
userToAdd: username
|
||||
//validationError: membername.length > 0 && !isMemberNameValid(membername)
|
||||
});
|
||||
};
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
import React from "react";
|
||||
|
||||
import { translate } from "react-i18next";
|
||||
import {AddButton} from "../../../components/buttons";
|
||||
import { AddButton } from "../../../components/buttons";
|
||||
import InputField from "../../../components/forms/InputField";
|
||||
|
||||
type Props = {
|
||||
t: string => string,
|
||||
addProxyExclude: string => void,
|
||||
disable: boolean
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {
|
||||
proxyExcludeToAdd: string,
|
||||
proxyExcludeToAdd: string
|
||||
//validationError: boolean
|
||||
};
|
||||
|
||||
@@ -20,7 +20,7 @@ class AddProxyExcludeField extends React.Component<Props, State> {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
proxyExcludeToAdd: "",
|
||||
proxyExcludeToAdd: ""
|
||||
//validationError: false
|
||||
};
|
||||
}
|
||||
@@ -30,19 +30,18 @@ class AddProxyExcludeField extends React.Component<Props, State> {
|
||||
return (
|
||||
<div className="field">
|
||||
<InputField
|
||||
|
||||
label={t("proxy-settings.add-proxy-exclude-textfield")}
|
||||
errorMessage={t("proxy-settings.add-proxy-exclude-error")}
|
||||
onChange={this.handleAddProxyExcludeChange}
|
||||
validationError={false}
|
||||
value={this.state.proxyExcludeToAdd}
|
||||
onReturnPressed={this.appendProxyExclude}
|
||||
disable={this.props.disable}
|
||||
disabled={this.props.disabled}
|
||||
/>
|
||||
<AddButton
|
||||
label={t("proxy-settings.add-proxy-exclude-button")}
|
||||
action={this.addButtonClicked}
|
||||
disabled={this.props.disable}
|
||||
disabled={this.props.disabled}
|
||||
//disabled={!isMemberNameValid(this.state.memberToAdd)}
|
||||
/>
|
||||
</div>
|
||||
@@ -65,7 +64,7 @@ class AddProxyExcludeField extends React.Component<Props, State> {
|
||||
handleAddProxyExcludeChange = (username: string) => {
|
||||
this.setState({
|
||||
...this.state,
|
||||
proxyExcludeToAdd: username,
|
||||
proxyExcludeToAdd: username
|
||||
//validationError: membername.length > 0 && !isMemberNameValid(membername)
|
||||
});
|
||||
};
|
||||
|
||||
@@ -11,12 +11,13 @@ type Props = {
|
||||
adminGroups: string[],
|
||||
adminUsers: string[],
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
hasUpdatePermission: boolean
|
||||
};
|
||||
|
||||
class AdminSettings extends React.Component<Props> {
|
||||
render() {
|
||||
const { t, adminGroups, adminUsers } = this.props;
|
||||
const { t, adminGroups, adminUsers, hasUpdatePermission } = this.props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -26,15 +27,19 @@ class AdminSettings extends React.Component<Props> {
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.props.onChange(isValid, changedValue, name)
|
||||
}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<AddAdminGroupField addGroup={this.addGroup} disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<AddAdminGroupField addGroup={this.addGroup} />
|
||||
<AdminUserTable
|
||||
adminUsers={adminUsers}
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.props.onChange(isValid, changedValue, name)
|
||||
}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<AddAdminUserField addUser={this.addUser} disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<AddAdminUserField addUser={this.addUser} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -8,12 +8,13 @@ type Props = {
|
||||
baseUrl: string,
|
||||
forceBaseUrl: boolean,
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
hasUpdatePermission: boolean
|
||||
};
|
||||
|
||||
class BaseUrlSettings extends React.Component<Props> {
|
||||
render() {
|
||||
const { t, baseUrl, forceBaseUrl } = this.props;
|
||||
const { t, baseUrl, forceBaseUrl, hasUpdatePermission } = this.props;
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -22,11 +23,13 @@ class BaseUrlSettings extends React.Component<Props> {
|
||||
checked={forceBaseUrl}
|
||||
label={t("base-url-settings.force-base-url")}
|
||||
onChange={this.handleForceBaseUrlChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("base-url-settings.base-url")}
|
||||
onChange={this.handleBaseUrlChange}
|
||||
value={baseUrl}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -66,9 +66,8 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, t } = this.props;
|
||||
const { loading, t, configUpdatePermission } = this.props;
|
||||
let config = this.state.config;
|
||||
|
||||
return (
|
||||
<form onSubmit={this.submit}>
|
||||
<GeneralSettings
|
||||
@@ -86,6 +85,7 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.onChange(isValid, changedValue, name)
|
||||
}
|
||||
hasUpdatePermission={configUpdatePermission}
|
||||
/>
|
||||
<hr />
|
||||
<BaseUrlSettings
|
||||
@@ -94,6 +94,7 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.onChange(isValid, changedValue, name)
|
||||
}
|
||||
hasUpdatePermission={configUpdatePermission}
|
||||
/>
|
||||
<hr />
|
||||
<AdminSettings
|
||||
@@ -102,6 +103,7 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.onChange(isValid, changedValue, name)
|
||||
}
|
||||
hasUpdatePermission={configUpdatePermission}
|
||||
/>
|
||||
<hr />
|
||||
<ProxySettings
|
||||
@@ -114,12 +116,14 @@ class ConfigForm extends React.Component<Props, State> {
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.onChange(isValid, changedValue, name)
|
||||
}
|
||||
hasUpdatePermission={configUpdatePermission}
|
||||
/>
|
||||
<hr />
|
||||
<SubmitButton
|
||||
// disabled={!this.isValid()}
|
||||
loading={loading}
|
||||
label={t("config-form.submit")}
|
||||
disabled={!configUpdatePermission}
|
||||
/>
|
||||
</form>
|
||||
);
|
||||
|
||||
@@ -16,7 +16,8 @@ type Props = {
|
||||
enabledXsrfProtection: boolean,
|
||||
defaultNamespaceStrategy: string,
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
hasUpdatePermission: boolean
|
||||
};
|
||||
|
||||
class GeneralSettings extends React.Component<Props> {
|
||||
@@ -33,7 +34,8 @@ class GeneralSettings extends React.Component<Props> {
|
||||
pluginUrl,
|
||||
loginAttemptLimitTimeout,
|
||||
enabledXsrfProtection,
|
||||
defaultNamespaceStrategy
|
||||
defaultNamespaceStrategy,
|
||||
hasUpdatePermission
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@@ -42,56 +44,67 @@ class GeneralSettings extends React.Component<Props> {
|
||||
label={t("general-settings.realm-description")}
|
||||
onChange={this.handleRealmDescriptionChange}
|
||||
value={realmDescription}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={enableRepositoryArchive}
|
||||
label={t("general-settings.enable-repository-archive")}
|
||||
onChange={this.handleEnableRepositoryArchiveChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={disableGroupingGrid}
|
||||
label={t("general-settings.disable-grouping-grid")}
|
||||
onChange={this.handleDisableGroupingGridChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("general-settings.date-format")}
|
||||
onChange={this.handleDateFormatChange}
|
||||
value={dateFormat}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={anonymousAccessEnabled}
|
||||
label={t("general-settings.anonymous-access-enabled")}
|
||||
onChange={this.handleAnonymousAccessEnabledChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("general-settings.login-attempt-limit")}
|
||||
onChange={this.handleLoginAttemptLimitChange}
|
||||
value={loginAttemptLimit}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("general-settings.login-attempt-limit-timeout")}
|
||||
onChange={this.handleLoginAttemptLimitTimeoutChange}
|
||||
value={loginAttemptLimitTimeout}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={skipFailedAuthenticators}
|
||||
label={t("general-settings.skip-failed-authenticators")}
|
||||
onChange={this.handleSkipFailedAuthenticatorsChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("general-settings.plugin-url")}
|
||||
onChange={this.handlePluginUrlChange}
|
||||
value={pluginUrl}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<Checkbox
|
||||
checked={enabledXsrfProtection}
|
||||
label={t("general-settings.enabled-xsrf-protection")}
|
||||
onChange={this.handleEnabledXsrfProtectionChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("general-settings.default-namespace-strategy")}
|
||||
onChange={this.handleDefaultNamespaceStrategyChange}
|
||||
value={defaultNamespaceStrategy}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -14,7 +14,8 @@ type Props = {
|
||||
enableProxy: boolean,
|
||||
proxyExcludes: string[], //TODO: einbauen!
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
hasUpdatePermission: boolean
|
||||
};
|
||||
|
||||
class ProxySettings extends React.Component<Props> {
|
||||
@@ -26,7 +27,8 @@ class ProxySettings extends React.Component<Props> {
|
||||
proxyServer,
|
||||
proxyUser,
|
||||
enableProxy,
|
||||
proxyExcludes
|
||||
proxyExcludes,
|
||||
hasUpdatePermission
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
@@ -36,39 +38,43 @@ class ProxySettings extends React.Component<Props> {
|
||||
checked={enableProxy}
|
||||
label={t("proxy-settings.enable-proxy")}
|
||||
onChange={this.handleEnableProxyChange}
|
||||
disabled={!hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("proxy-settings.proxy-password")}
|
||||
onChange={this.handleProxyPasswordChange}
|
||||
value={proxyPassword}
|
||||
disable={!enableProxy}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("proxy-settings.proxy-port")}
|
||||
value={proxyPort}
|
||||
onChange={this.handleProxyPortChange}
|
||||
disable={!enableProxy}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("proxy-settings.proxy-server")}
|
||||
value={proxyServer}
|
||||
onChange={this.handleProxyServerChange}
|
||||
disable={!enableProxy}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<InputField
|
||||
label={t("proxy-settings.proxy-user")}
|
||||
value={proxyUser}
|
||||
onChange={this.handleProxyUserChange}
|
||||
disable={!enableProxy}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<ProxyExcludesTable
|
||||
proxyExcludes={proxyExcludes}
|
||||
onChange={(isValid, changedValue, name) =>
|
||||
this.props.onChange(isValid, changedValue, name)
|
||||
}
|
||||
disable={!enableProxy}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<AddProxyExcludeField
|
||||
addProxyExclude={this.addProxyExclude}
|
||||
disabled={!enableProxy || !hasUpdatePermission}
|
||||
/>
|
||||
<AddProxyExcludeField addProxyExclude={this.addProxyExclude} disable={!enableProxy}/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -6,14 +6,15 @@ import RemoveAdminGroupButton from "../buttons/RemoveAdminGroupButton";
|
||||
type Props = {
|
||||
adminGroups: string[],
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
|
||||
class AdminGroupTable extends React.Component<Props, State> {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, disabled } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<label className="label">{t("admin-settings.admin-groups")}</label>
|
||||
@@ -27,6 +28,7 @@ class AdminGroupTable extends React.Component<Props, State> {
|
||||
<RemoveAdminGroupButton
|
||||
groupname={group}
|
||||
removeGroup={this.removeGroup}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -2,18 +2,20 @@
|
||||
import React from "react";
|
||||
import { translate } from "react-i18next";
|
||||
import RemoveAdminUserButton from "../buttons/RemoveAdminUserButton";
|
||||
import { InputField } from "../../../components/forms";
|
||||
|
||||
type Props = {
|
||||
adminUsers: string[],
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void
|
||||
onChange: (boolean, any, string) => void,
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
|
||||
class AdminUserTable extends React.Component<Props, State> {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const { t, disabled } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<label className="label">{t("admin-settings.admin-users")}</label>
|
||||
@@ -27,6 +29,7 @@ class AdminUserTable extends React.Component<Props, State> {
|
||||
<RemoveAdminUserButton
|
||||
username={user}
|
||||
removeUser={this.removeUser}
|
||||
disabled={disabled}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -7,7 +7,7 @@ type Props = {
|
||||
proxyExcludes: string[],
|
||||
t: string => string,
|
||||
onChange: (boolean, any, string) => void,
|
||||
disable: boolean
|
||||
disabled: boolean
|
||||
};
|
||||
|
||||
type State = {};
|
||||
@@ -28,7 +28,7 @@ class ProxyExcludesTable extends React.Component<Props, State> {
|
||||
<RemoveProxyExcludeButton
|
||||
proxyExcludeName={excludes}
|
||||
removeProxyExclude={this.removeProxyExclude}
|
||||
disable={this.props.disable}
|
||||
disabled={this.props.disabled}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -71,6 +71,7 @@ class GlobalConfig extends React.Component<Props> {
|
||||
submitForm={config => this.modifyConfig(config)}
|
||||
config={config}
|
||||
loading={loading}
|
||||
configUpdatePermission={configUpdatePermission}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user