2019-10-20 18:02:52 +02:00
|
|
|
import React from "react";
|
2019-10-23 15:47:08 +02:00
|
|
|
import { WithTranslation, withTranslation } from "react-i18next";
|
2019-10-20 18:02:52 +02:00
|
|
|
import { RepositoryRole } from "@scm-manager/ui-types";
|
|
|
|
|
import AvailableVerbs from "./AvailableVerbs";
|
2019-10-19 16:38:07 +02:00
|
|
|
|
2019-10-23 15:47:08 +02:00
|
|
|
type Props = WithTranslation & {
|
2019-10-19 16:38:07 +02:00
|
|
|
role: RepositoryRole;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class PermissionRoleDetailsTable extends React.Component<Props> {
|
|
|
|
|
render() {
|
|
|
|
|
const { role, t } = this.props;
|
|
|
|
|
return (
|
|
|
|
|
<table className="table content">
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repositoryRole.name")}</th>
|
2019-10-19 16:38:07 +02:00
|
|
|
<td>{role.name}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repositoryRole.type")}</th>
|
2019-10-19 16:38:07 +02:00
|
|
|
<td>{role.type}</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
2019-10-20 18:02:52 +02:00
|
|
|
<th>{t("repositoryRole.verbs")}</th>
|
2019-10-19 16:38:07 +02:00
|
|
|
<AvailableVerbs role={role} />
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2019-10-23 15:47:08 +02:00
|
|
|
export default withTranslation("admin")(PermissionRoleDetailsTable);
|