mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 08:25:44 +01:00
38 lines
905 B
TypeScript
38 lines
905 B
TypeScript
|
|
import React from 'react';
|
||
|
|
import { RepositoryRole } from '@scm-manager/ui-types';
|
||
|
|
import { translate } from 'react-i18next';
|
||
|
|
import AvailableVerbs from './AvailableVerbs';
|
||
|
|
|
||
|
|
type Props = {
|
||
|
|
role: RepositoryRole;
|
||
|
|
|
||
|
|
// context props
|
||
|
|
t: (p: string) => string;
|
||
|
|
};
|
||
|
|
|
||
|
|
class PermissionRoleDetailsTable extends React.Component<Props> {
|
||
|
|
render() {
|
||
|
|
const { role, t } = this.props;
|
||
|
|
return (
|
||
|
|
<table className="table content">
|
||
|
|
<tbody>
|
||
|
|
<tr>
|
||
|
|
<th>{t('repositoryRole.name')}</th>
|
||
|
|
<td>{role.name}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>{t('repositoryRole.type')}</th>
|
||
|
|
<td>{role.type}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>{t('repositoryRole.verbs')}</th>
|
||
|
|
<AvailableVerbs role={role} />
|
||
|
|
</tr>
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export default translate('admin')(PermissionRoleDetailsTable);
|