mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
added temp indexResource + RoleTable
This commit is contained in:
34
scm-ui/src/config/components/table/RoleTable.js
Normal file
34
scm-ui/src/config/components/table/RoleTable.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// @flow
|
||||||
|
import React from "react";
|
||||||
|
import { translate } from "react-i18next";
|
||||||
|
import type { Role } from "@scm-manager/ui-types";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
t: string => string,
|
||||||
|
roles: Role[]
|
||||||
|
};
|
||||||
|
|
||||||
|
class RoleTable extends React.Component<Props> {
|
||||||
|
render() {
|
||||||
|
const { roles, t } = this.props;
|
||||||
|
return (
|
||||||
|
<table className="card-table table is-hoverable is-fullwidth">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th className="is-hidden-mobile">{t("user.name")}</th>
|
||||||
|
<th>{t("user.displayName")}</th>
|
||||||
|
<th>{t("user.mail")}</th>
|
||||||
|
<th className="is-hidden-mobile">{t("user.active")}</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
{roles.map((role, index) => {
|
||||||
|
return <p key={index}>role</p>;
|
||||||
|
})}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default translate("config")(RoleTable);
|
||||||
@@ -151,6 +151,11 @@ export function getSvnConfigLink(state: Object) {
|
|||||||
return getLink(state, "svnConfig");
|
return getLink(state, "svnConfig");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getRolesLink(state: Object) {
|
||||||
|
//return getLink(state, "availableRepositoryPermissions");
|
||||||
|
return "http://localhost:8081/scm/api/v2/repository-roles"; // TODO
|
||||||
|
}
|
||||||
|
|
||||||
export function getUserAutoCompleteLink(state: Object): string {
|
export function getUserAutoCompleteLink(state: Object): string {
|
||||||
const link = getLinkCollection(state, "autocomplete").find(
|
const link = getLinkCollection(state, "autocomplete").find(
|
||||||
i => i.name === "users"
|
i => i.name === "users"
|
||||||
|
|||||||
Reference in New Issue
Block a user