refactor / enable routing after createRepoRole

This commit is contained in:
Eduard Heimbuch
2019-05-15 16:57:28 +02:00
parent 6c627bfe00
commit 60cf070c44
5 changed files with 10 additions and 16 deletions

View File

@@ -6,7 +6,6 @@ import type { Role } from "@scm-manager/ui-types";
import { InputField, SubmitButton } from "@scm-manager/ui-components";
import PermissionCheckbox from "../../../repos/permissions/components/PermissionCheckbox";
import {
createRole,
fetchAvailableVerbs,
getFetchVerbsFailure,
getVerbsFromState,
@@ -27,7 +26,6 @@ type Props = {
// dispatch functions
fetchAvailableVerbs: (link: string) => void
// addRole: (link: string, role: Role) => void
};
type State = {
@@ -107,7 +105,6 @@ class RepositoryRoleForm extends React.Component<Props, State> {
: availableVerbs.map(verb => (
<PermissionCheckbox
key={verb}
// disabled={readOnly}
name={verb}
checked={role.verbs.includes(verb)}
onChange={this.handleVerbChange}
@@ -164,13 +161,10 @@ const mapDispatchToProps = dispatch => {
fetchAvailableVerbs: (link: string) => {
dispatch(fetchAvailableVerbs(link));
},
// addRole: (link: string, role: Role) => {
// createRole(link, role)
// }
};
};
export default connect(
mapStateToProps,
mapDispatchToProps
)(translate("roles")(RepositoryRoleForm));
)(translate("config")(RepositoryRoleForm));