mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 23:24:52 +09:00
Hide or disable controls in the web interface that the user for the control connection it's connected as don't have the requisite permissions to use.
16 lines
413 B
React
16 lines
413 B
React
import React, { useContext } from "react";
|
|
|
|
import { useAccount } from "../model/account";
|
|
import MasterConfigTree from "./MasterConfigTree";
|
|
import PageLayout from "./PageLayout";
|
|
|
|
|
|
export default function SlavesPage() {
|
|
let account = useAccount();
|
|
|
|
return <PageLayout nav={[{ name: "Master" }]}>
|
|
<h2>Master</h2>
|
|
{account.hasPermission("core.master.get_config") && <MasterConfigTree />}
|
|
</PageLayout>;
|
|
};
|