org.apache.maven.plugins
@@ -817,6 +817,10 @@
**/*StoreFactory.java,**/*UserPassword.js
+ 8.11.4
+ ./scm-ui/target/frontend/buildfrontend-node/node-v${node.version}-linux-x64/bin/node
+
+
diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java
index c67b9ff5d9..f9a67f8656 100644
--- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java
+++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/HgModificationsCommand.java
@@ -4,8 +4,6 @@ import sonia.scm.repository.Modifications;
import sonia.scm.repository.Repository;
import sonia.scm.repository.spi.javahg.HgLogChangesetCommand;
-import java.text.MessageFormat;
-
public class HgModificationsCommand extends AbstractCommand implements ModificationsCommand {
HgModificationsCommand(HgCommandContext context, Repository repository) {
@@ -17,8 +15,7 @@ public class HgModificationsCommand extends AbstractCommand implements Modificat
public Modifications getModifications(String revision) {
com.aragost.javahg.Repository repository = open();
HgLogChangesetCommand hgLogChangesetCommand = HgLogChangesetCommand.on(repository, getContext().getConfig());
- int hgRevision = hgLogChangesetCommand.rev(revision).singleRevision();
- Modifications modifications = hgLogChangesetCommand.rev(MessageFormat.format("{0}:{0}", hgRevision)).extractModifications();
+ Modifications modifications = hgLogChangesetCommand.rev(revision).extractModifications();
modifications.setRevision(revision);
return modifications;
}
diff --git a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java
index f57c2a63d9..12a77ac717 100644
--- a/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java
+++ b/scm-plugins/scm-hg-plugin/src/main/java/sonia/scm/repository/spi/javahg/HgLogChangesetCommand.java
@@ -1,19 +1,19 @@
/**
* Copyright (c) 2010, Sebastian Sdorra
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
- *
+ *
* 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
+ * this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
* 3. Neither the name of SCM-Manager; nor the names of its
- * contributors may be used to endorse or promote products derived from this
- * software without specific prior written permission.
- *
+ * contributors may be used to endorse or promote products derived from this
+ * software without specific prior written permission.
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@@ -24,99 +24,64 @@
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
+ *
* http://bitbucket.org/sdorra/scm-manager
- *
*/
-
package sonia.scm.repository.spi.javahg;
-//~--- non-JDK imports --------------------------------------------------------
-
import com.aragost.javahg.Repository;
import com.aragost.javahg.internals.HgInputStream;
import com.aragost.javahg.internals.Utils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import sonia.scm.repository.Changeset;
import sonia.scm.repository.HgConfig;
import sonia.scm.repository.Modifications;
+import java.io.IOException;
import java.util.List;
-//~--- JDK imports ------------------------------------------------------------
-
/**
- *
* @author Sebastian Sdorra
*/
-public class HgLogChangesetCommand extends AbstractChangesetCommand
-{
+public class HgLogChangesetCommand extends AbstractChangesetCommand {
- /**
- * Constructs ...
- *
- *
- * @param repository
- * @param config
- */
- private HgLogChangesetCommand(Repository repository, HgConfig config)
- {
+ private static final Logger LOG = LoggerFactory.getLogger(HgLogChangesetCommand.class);
+
+ private HgLogChangesetCommand(Repository repository, HgConfig config) {
super(repository, config);
}
- //~--- methods --------------------------------------------------------------
- /**
- * Method description
- *
- *
- * @param repository
- * @param config
- *
- * @return
- */
- public static HgLogChangesetCommand on(Repository repository, HgConfig config)
- {
+ public static HgLogChangesetCommand on(Repository repository, HgConfig config) {
return new HgLogChangesetCommand(repository, config);
}
- /**
- * Method description
- *
- *
- * @param branch
- *
- * @return
- */
- public HgLogChangesetCommand branch(String branch)
- {
+
+ public HgLogChangesetCommand branch(String branch) {
cmdAppend("-b", branch);
return this;
}
- /**
- * Method description
- *
- *
- * @param files
- *
- * @return
- */
- public List execute(String... files)
- {
+
+ public List execute(String... files) {
return readListFromStream(getHgInputStream(files, CHANGESET_EAGER_STYLE_PATH));
}
- /**
- * Extract Modifications from the Repository files
- *
- * @param files repo files
- * @return modifications
- */
public Modifications extractModifications(String... files) {
- return readModificationsFromStream(getHgInputStream(files, CHANGESET_EAGER_STYLE_PATH));
+ HgInputStream hgInputStream = getHgInputStream(files, CHANGESET_EAGER_STYLE_PATH);
+ try {
+ return readModificationsFromStream(hgInputStream);
+ } finally {
+ try {
+ hgInputStream.close();
+ } catch (IOException e) {
+ LOG.error("Could not close HgInputStream", e);
+ }
+ }
}
HgInputStream getHgInputStream(String[] files, String changesetStylePath) {
@@ -124,93 +89,39 @@ public class HgLogChangesetCommand extends AbstractChangesetCommand
return launchStream(files);
}
- /**
- * Method description
- *
- *
- * @param limit
- *
- * @return
- */
- public HgLogChangesetCommand limit(int limit)
- {
+ public HgLogChangesetCommand limit(int limit) {
cmdAppend("-l", limit);
return this;
}
- /**
- * Method description
- *
- *
- * @param files
- *
- * @return
- */
- public List loadRevisions(String... files)
- {
+
+ public List loadRevisions(String... files) {
return loadRevisionsFromStream(getHgInputStream(files, CHANGESET_LAZY_STYLE_PATH));
}
- /**
- * Method description
- *
- *
- * @param rev
- *
- * @return
- */
- public HgLogChangesetCommand rev(String... rev)
- {
+ public HgLogChangesetCommand rev(String... rev) {
cmdAppend("-r", rev);
return this;
}
- /**
- * Method description
- *
- *
- * @param files
- *
- * @return
- */
- public Changeset single(String... files)
- {
+ public Changeset single(String... files) {
return Utils.single(execute(files));
}
- /**
- * Method description
- *
- *
- * @param files
- *
- * @return
- */
- public int singleRevision(String... files)
- {
+ public int singleRevision(String... files) {
Integer rev = Utils.single(loadRevisions(files));
- if (rev == null)
- {
+ if (rev == null) {
rev = -1;
}
return rev;
}
- //~--- get methods ----------------------------------------------------------
-
- /**
- * Method description
- *
- *
- * @return
- */
@Override
- public String getCommandName()
- {
+ public String getCommandName() {
return "log";
}
}
diff --git a/scm-ui-components/packages/ui-components/src/LinkPaginator.js b/scm-ui-components/packages/ui-components/src/LinkPaginator.js
index aaf13d7b15..d09306e04c 100644
--- a/scm-ui-components/packages/ui-components/src/LinkPaginator.js
+++ b/scm-ui-components/packages/ui-components/src/LinkPaginator.js
@@ -25,13 +25,13 @@ class LinkPaginator extends React.Component {
);
}
- renderPreviousButton(label?: string) {
+ renderPreviousButton(className: string, label?: string) {
const { page } = this.props;
const previousPage = page - 1;
return (
{
return collection._links[name];
}
- renderNextButton(label?: string) {
+ renderNextButton(className: string, label?: string) {
const { page } = this.props;
const nextPage = page + 1;
return (
{
links.push(this.separator());
}
if (page > 2) {
- links.push(this.renderPreviousButton());
+ links.push(this.renderPreviousButton("pagination-link"));
}
links.push(this.currentPage(page));
if (page + 1 < pageTotal) {
- links.push(this.renderNextButton());
+ links.push(this.renderNextButton("pagination-link"));
}
if (page + 2 < pageTotal)
//if there exists pages between next and last
@@ -118,13 +118,13 @@ class LinkPaginator extends React.Component {
const { t } = this.props;
return (
- {this.renderPreviousButton(t("paginator.previous"))}
+ {this.renderPreviousButton("pagination-previous", t("paginator.previous"))}
{this.pageLinks().map((link, index) => {
return {link} ;
})}
- {this.renderNextButton(t("paginator.next"))}
+ {this.renderNextButton("pagination-next", t("paginator.next"))}
);
}
diff --git a/scm-ui/src/groups/components/MemberNameTable.js b/scm-ui-components/packages/ui-components/src/forms/MemberNameTable.js
similarity index 84%
rename from scm-ui/src/groups/components/MemberNameTable.js
rename to scm-ui-components/packages/ui-components/src/forms/MemberNameTable.js
index 59f12461fe..0db3751239 100644
--- a/scm-ui/src/groups/components/MemberNameTable.js
+++ b/scm-ui-components/packages/ui-components/src/forms/MemberNameTable.js
@@ -1,10 +1,7 @@
//@flow
import React from "react";
import { translate } from "react-i18next";
-import {
- RemoveEntryOfTableButton,
- LabelWithHelpIcon
-} from "@scm-manager/ui-components";
+import RemoveEntryOfTableButton from "../buttons/RemoveEntryOfTableButton";
type Props = {
members: string[],
@@ -19,10 +16,6 @@ class MemberNameTable extends React.Component {
const { t } = this.props;
return (
-
{this.props.members.map(member => {
diff --git a/scm-ui-components/packages/ui-components/src/forms/index.js b/scm-ui-components/packages/ui-components/src/forms/index.js
index 3bc3820f16..8d27ab05cd 100644
--- a/scm-ui-components/packages/ui-components/src/forms/index.js
+++ b/scm-ui-components/packages/ui-components/src/forms/index.js
@@ -2,6 +2,7 @@
export { default as AddEntryToTableField } from "./AddEntryToTableField.js";
export { default as AutocompleteAddEntryToTableField } from "./AutocompleteAddEntryToTableField.js";
+export { default as MemberNameTable } from "./MemberNameTable.js";
export { default as Checkbox } from "./Checkbox.js";
export { default as InputField } from "./InputField.js";
export { default as Select } from "./Select.js";
diff --git a/scm-ui-components/packages/ui-components/src/modals/ConfirmAlert.js b/scm-ui-components/packages/ui-components/src/modals/ConfirmAlert.js
index a14a3560b8..1f93024865 100644
--- a/scm-ui-components/packages/ui-components/src/modals/ConfirmAlert.js
+++ b/scm-ui-components/packages/ui-components/src/modals/ConfirmAlert.js
@@ -43,6 +43,7 @@ class ConfirmAlert extends React.Component {
this.handleClickButton(button)}
+ href="javascript:void(0);"
>
{button.label}
diff --git a/scm-ui-components/packages/ui-components/src/navigation/NavAction.js b/scm-ui-components/packages/ui-components/src/navigation/NavAction.js
index 5eacbb7407..e93fd8dd52 100644
--- a/scm-ui-components/packages/ui-components/src/navigation/NavAction.js
+++ b/scm-ui-components/packages/ui-components/src/navigation/NavAction.js
@@ -2,16 +2,23 @@
import React from "react";
type Props = {
+ icon?: string,
label: string,
action: () => void
};
class NavAction extends React.Component {
render() {
- const { label, action } = this.props;
+ const { label, icon, action } = this.props;
+
+ let showIcon = null;
+ if (icon) {
+ showIcon = (<> {" "}>);
+ }
+
return (
- {label}
+ {showIcon}{label}
);
}
diff --git a/scm-ui-components/packages/ui-components/src/navigation/NavLink.js b/scm-ui-components/packages/ui-components/src/navigation/NavLink.js
index 9a7c72adb1..53b124ef31 100644
--- a/scm-ui-components/packages/ui-components/src/navigation/NavLink.js
+++ b/scm-ui-components/packages/ui-components/src/navigation/NavLink.js
@@ -6,6 +6,7 @@ import {Link, Route} from "react-router-dom";
type Props = {
to: string,
+ icon?: string,
label: string,
activeOnlyWhenExact?: boolean,
activeWhenMatch?: (route: any) => boolean
@@ -23,10 +24,17 @@ class NavLink extends React.Component {
}
renderLink = (route: any) => {
- const { to, label } = this.props;
+ const { to, icon, label } = this.props;
+
+ let showIcon = null;
+ if (icon) {
+ showIcon = (<> {" "}>);
+ }
+
return (
+ {showIcon}
{label}
@@ -35,6 +43,7 @@ class NavLink extends React.Component {
render() {
const { to, activeOnlyWhenExact } = this.props;
+
return (
);
diff --git a/scm-ui/src/containers/Profile.js b/scm-ui/src/containers/Profile.js
index b40f5f3ee0..3464e125dd 100644
--- a/scm-ui/src/containers/Profile.js
+++ b/scm-ui/src/containers/Profile.js
@@ -70,7 +70,7 @@ class Profile extends React.Component {
string,
@@ -97,6 +98,10 @@ class GroupForm extends React.Component {
validationError={false}
helpText={t("group-form.help.descriptionHelpText")}
/>
+
{
buttons: [
{
label: t("delete-group-button.confirm-alert.submit"),
- onClick: () => this.deleteGroup()
+ onClick: () => this.deleteGroup(),
},
{
label: t("delete-group-button.confirm-alert.cancel"),
@@ -49,7 +49,7 @@ export class DeleteGroupNavLink extends React.Component {
if (!this.isDeletable()) {
return null;
}
- return ;
+ return ;
}
}
diff --git a/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js b/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
index a0e36bc8d7..e8bcd26385 100644
--- a/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
+++ b/scm-ui/src/groups/components/navLinks/EditGroupNavLink.js
@@ -18,7 +18,7 @@ class EditGroupNavLink extends React.Component {
if (!this.isEditable()) {
return null;
}
- return ;
+ return ;
}
isEditable = () => {
diff --git a/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js b/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
index 41bc57da30..a1314f9987 100644
--- a/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
+++ b/scm-ui/src/groups/components/navLinks/SetPermissionsNavLink.js
@@ -17,7 +17,7 @@ class ChangePermissionNavLink extends React.Component {
if (!this.hasPermissionToSetPermission()) {
return null;
}
- return ;
+ return ;
}
hasPermissionToSetPermission = () => {
diff --git a/scm-ui/src/groups/containers/AddGroup.js b/scm-ui/src/groups/containers/AddGroup.js
index c19f6156d1..69c1171ea9 100644
--- a/scm-ui/src/groups/containers/AddGroup.js
+++ b/scm-ui/src/groups/containers/AddGroup.js
@@ -68,11 +68,13 @@ class AddGroup extends React.Component {
});
});
};
- groupCreated = () => {
- this.props.history.push("/groups");
+ groupCreated = (group: Group) => {
+ this.props.history.push("/group/" + group.name);
};
createGroup = (group: Group) => {
- this.props.createGroup(this.props.createLink, group, this.groupCreated);
+ this.props.createGroup(this.props.createLink, group, () =>
+ this.groupCreated(group)
+ );
};
}
diff --git a/scm-ui/src/groups/containers/SingleGroup.js b/scm-ui/src/groups/containers/SingleGroup.js
index 2c88da75fb..19c5d53c01 100644
--- a/scm-ui/src/groups/containers/SingleGroup.js
+++ b/scm-ui/src/groups/containers/SingleGroup.js
@@ -131,6 +131,7 @@ class SingleGroup extends React.Component {
{
deleteGroup={this.deleteGroup}
/>
-
+
diff --git a/scm-ui/src/repos/components/DeleteNavAction.js b/scm-ui/src/repos/components/DeleteNavAction.js
index c2369a5bfb..fe35a9caf1 100644
--- a/scm-ui/src/repos/components/DeleteNavAction.js
+++ b/scm-ui/src/repos/components/DeleteNavAction.js
@@ -51,7 +51,7 @@ class DeleteNavAction extends React.Component {
if (!this.isDeletable()) {
return null;
}
- return ;
+ return ;
}
}
diff --git a/scm-ui/src/repos/components/EditNavLink.js b/scm-ui/src/repos/components/EditNavLink.js
index 1a49fdee81..a42625a154 100644
--- a/scm-ui/src/repos/components/EditNavLink.js
+++ b/scm-ui/src/repos/components/EditNavLink.js
@@ -15,7 +15,7 @@ class EditNavLink extends React.Component {
return null;
}
const { editUrl, t } = this.props;
- return ;
+ return ;
}
}
diff --git a/scm-ui/src/repos/components/EditNavLink.test.js b/scm-ui/src/repos/components/EditNavLink.test.js
index 935b7cf928..fdb13ade8d 100644
--- a/scm-ui/src/repos/components/EditNavLink.test.js
+++ b/scm-ui/src/repos/components/EditNavLink.test.js
@@ -33,6 +33,6 @@ describe("EditNavLink", () => {
,
options.get()
);
- expect(navLink.text()).toBe("edit-nav-link.label");
+ expect(navLink.text()).toBe(" edit-nav-link.label");
});
});
diff --git a/scm-ui/src/repos/components/PermissionsNavLink.js b/scm-ui/src/repos/components/PermissionsNavLink.js
index cb6d0e0723..3a6f97588b 100644
--- a/scm-ui/src/repos/components/PermissionsNavLink.js
+++ b/scm-ui/src/repos/components/PermissionsNavLink.js
@@ -20,7 +20,7 @@ class PermissionsNavLink extends React.Component {
}
const { permissionUrl, t } = this.props;
return (
-
+
);
}
}
diff --git a/scm-ui/src/repos/components/PermissionsNavLink.test.js b/scm-ui/src/repos/components/PermissionsNavLink.test.js
index 450c7f49e6..901175caa0 100644
--- a/scm-ui/src/repos/components/PermissionsNavLink.test.js
+++ b/scm-ui/src/repos/components/PermissionsNavLink.test.js
@@ -33,6 +33,6 @@ describe("PermissionsNavLink", () => {
,
options.get()
);
- expect(navLink.text()).toBe("repository-root.permissions");
+ expect(navLink.text()).toBe(" repository-root.permissions");
});
});
diff --git a/scm-ui/src/repos/containers/Create.js b/scm-ui/src/repos/containers/Create.js
index 4cf8d468de..2cdd61fbbd 100644
--- a/scm-ui/src/repos/containers/Create.js
+++ b/scm-ui/src/repos/containers/Create.js
@@ -29,7 +29,11 @@ type Props = {
// dispatch functions
fetchRepositoryTypesIfNeeded: () => void,
- createRepo: (link: string, Repository, callback: () => void) => void,
+ createRepo: (
+ link: string,
+ Repository,
+ callback: (repo: Repository) => void
+ ) => void,
resetForm: () => void,
// context props
@@ -43,9 +47,10 @@ class Create extends React.Component {
this.props.fetchRepositoryTypesIfNeeded();
}
- repoCreated = () => {
+ repoCreated = (repo: Repository) => {
const { history } = this.props;
- history.push("/repos");
+
+ history.push("/repo/" + repo.namespace + "/" + repo.name);
};
render() {
@@ -70,7 +75,9 @@ class Create extends React.Component {
repositoryTypes={repositoryTypes}
loading={createLoading}
submitForm={repo => {
- createRepo(repoLink, repo, this.repoCreated);
+ createRepo(repoLink, repo, (repo: Repository) =>
+ this.repoCreated(repo)
+ );
}}
/>
diff --git a/scm-ui/src/repos/containers/RepositoryRoot.js b/scm-ui/src/repos/containers/RepositoryRoot.js
index e73348babc..07b6681752 100644
--- a/scm-ui/src/repos/containers/RepositoryRoot.js
+++ b/scm-ui/src/repos/containers/RepositoryRoot.js
@@ -169,11 +169,12 @@ class RepositoryRoot extends React.Component {
-
+
{
repository={repository}
linkName="sources"
to={`${url}/sources`}
+ icon="fas fa-code"
label={t("repository-root.sources")}
activeOnlyWhenExact={false}
/>
@@ -189,7 +191,6 @@ class RepositoryRoot extends React.Component {
permissionUrl={`${url}/permissions`}
repository={repository}
/>
-
{
diff --git a/scm-ui/src/repos/modules/repos.js b/scm-ui/src/repos/modules/repos.js
index 3e574aa938..aa77b4553b 100644
--- a/scm-ui/src/repos/modules/repos.js
+++ b/scm-ui/src/repos/modules/repos.js
@@ -164,16 +164,21 @@ export function fetchRepoFailure(
export function createRepo(
link: string,
repository: Repository,
- callback?: () => void
+ callback?: (repo: Repository) => void
) {
return function(dispatch: any) {
dispatch(createRepoPending());
return apiClient
.post(link, repository, CONTENT_TYPE)
- .then(() => {
+ .then(response => {
+ const location = response.headers.get("Location");
dispatch(createRepoSuccess());
+ return apiClient.get(location);
+ })
+ .then(response => response.json())
+ .then(response => {
if (callback) {
- callback();
+ callback(response);
}
})
.catch(err => {
diff --git a/scm-ui/src/repos/modules/repos.test.js b/scm-ui/src/repos/modules/repos.test.js
index e8d9873e99..ca4b6802b8 100644
--- a/scm-ui/src/repos/modules/repos.test.js
+++ b/scm-ui/src/repos/modules/repos.test.js
@@ -415,9 +415,14 @@ describe("repos fetch", () => {
it("should successfully create repo slarti/fjords", () => {
fetchMock.postOnce(REPOS_URL, {
- status: 201
+ status: 201,
+ headers: {
+ location: "repositories/slarti/fjords"
+ }
});
+ fetchMock.getOnce(REPOS_URL + "/slarti/fjords", slartiFjords);
+
const expectedActions = [
{
type: CREATE_REPO_PENDING
@@ -435,12 +440,19 @@ describe("repos fetch", () => {
it("should successfully create repo slarti/fjords and call the callback", () => {
fetchMock.postOnce(REPOS_URL, {
- status: 201
+ status: 201,
+ headers: {
+ location: "repositories/slarti/fjords"
+ }
});
+
+ fetchMock.getOnce(REPOS_URL + "/slarti/fjords", slartiFjords);
+
let callMe = "not yet";
- const callback = () => {
+ const callback = (r: any) => {
+ expect(r).toEqual(slartiFjords);
callMe = "yeah";
};
diff --git a/scm-ui/src/users/components/navLinks/DeleteUserNavLink.js b/scm-ui/src/users/components/navLinks/DeleteUserNavLink.js
index 47fdae0f92..80c355e999 100644
--- a/scm-ui/src/users/components/navLinks/DeleteUserNavLink.js
+++ b/scm-ui/src/users/components/navLinks/DeleteUserNavLink.js
@@ -49,7 +49,7 @@ class DeleteUserNavLink extends React.Component {
if (!this.isDeletable()) {
return null;
}
- return ;
+ return ;
}
}
diff --git a/scm-ui/src/users/components/navLinks/EditUserNavLink.js b/scm-ui/src/users/components/navLinks/EditUserNavLink.js
index 9999428212..8be8dbc621 100644
--- a/scm-ui/src/users/components/navLinks/EditUserNavLink.js
+++ b/scm-ui/src/users/components/navLinks/EditUserNavLink.js
@@ -17,7 +17,7 @@ class EditUserNavLink extends React.Component {
if (!this.isEditable()) {
return null;
}
- return ;
+ return ;
}
isEditable = () => {
diff --git a/scm-ui/src/users/components/navLinks/SetPasswordNavLink.js b/scm-ui/src/users/components/navLinks/SetPasswordNavLink.js
index 43b7a4b5a4..46e931e788 100644
--- a/scm-ui/src/users/components/navLinks/SetPasswordNavLink.js
+++ b/scm-ui/src/users/components/navLinks/SetPasswordNavLink.js
@@ -17,7 +17,7 @@ class ChangePasswordNavLink extends React.Component {
if (!this.hasPermissionToSetPassword()) {
return null;
}
- return ;
+ return ;
}
hasPermissionToSetPassword = () => {
diff --git a/scm-ui/src/users/components/navLinks/SetPermissionsNavLink.js b/scm-ui/src/users/components/navLinks/SetPermissionsNavLink.js
index cfdb1775a3..3c593d9427 100644
--- a/scm-ui/src/users/components/navLinks/SetPermissionsNavLink.js
+++ b/scm-ui/src/users/components/navLinks/SetPermissionsNavLink.js
@@ -17,7 +17,7 @@ class ChangePermissionNavLink extends React.Component {
if (!this.hasPermissionToSetPermission()) {
return null;
}
- return ;
+ return ;
}
hasPermissionToSetPermission = () => {
diff --git a/scm-ui/src/users/containers/AddUser.js b/scm-ui/src/users/containers/AddUser.js
index 1ee6fc759d..f19f974265 100644
--- a/scm-ui/src/users/containers/AddUser.js
+++ b/scm-ui/src/users/containers/AddUser.js
@@ -12,7 +12,7 @@ import {
} from "../modules/users";
import { Page } from "@scm-manager/ui-components";
import { translate } from "react-i18next";
-import {getUsersLink} from "../../modules/indexResource";
+import { getUsersLink } from "../../modules/indexResource";
type Props = {
loading?: boolean,
@@ -33,13 +33,15 @@ class AddUser extends React.Component {
this.props.resetForm();
}
- userCreated = () => {
+ userCreated = (user: User) => {
const { history } = this.props;
- history.push("/users");
+ history.push("/user/" + user.name);
};
createUser = (user: User) => {
- this.props.addUser(this.props.usersLink, user, this.userCreated);
+ this.props.addUser(this.props.usersLink, user, () =>
+ this.userCreated(user)
+ );
};
render() {
diff --git a/scm-ui/src/users/containers/SingleUser.js b/scm-ui/src/users/containers/SingleUser.js
index bd172f3f41..4a827ee75a 100644
--- a/scm-ui/src/users/containers/SingleUser.js
+++ b/scm-ui/src/users/containers/SingleUser.js
@@ -122,6 +122,7 @@ class SingleUser extends React.Component {
@@ -136,7 +137,7 @@ class SingleUser extends React.Component {