try to correct add permission

This commit is contained in:
Maren Süwer
2018-09-11 10:22:22 +02:00
parent 0127050246
commit 75ba5f33b1
2 changed files with 15 additions and 10 deletions

View File

@@ -14,10 +14,7 @@ import {
createPermissionReset,
getDeletePermissionsFailure
} from "../modules/permissions";
import {
Loading,
ErrorPage
} from "@scm-manager/ui-components";
import { Loading, ErrorPage } from "@scm-manager/ui-components";
import type {
Permission,
PermissionCollection,
@@ -66,11 +63,14 @@ class Permissions extends React.Component<Props> {
}
permissionCreated = () => {
const { namespace, repoName } = this.props;
const { namespace, repoName, history } = this.props;
console.log("fetch permissions!");
//history.push(`/repo/${namespace}/${repoName}/permissions`);
this.props.fetchPermissions(namespace, repoName);
};
createPermission = (permission: Permission) => {
console.log("create Permission");
this.props.createPermission(
permission,
this.props.namespace,