mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-18 15:33:12 +09:00
Hide unauthorized web interface controls
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.
This commit is contained in:
1 parent
18e9fc8e7c
commit
0c74aef68e
15 files changed
+417
-489
No files matched your search
@@ -31,7 +31,12 @@ function InventoryPage() {
|
||||
export class WebPlugin extends libPlugin.BaseWebPlugin {
|
||||
async init() {
|
||||
this.pages = [
|
||||
{ path: "/inventory", sidebarName: "Inventory sync", content: <InventoryPage /> },
|
||||
{
|
||||
path: "/inventory",
|
||||
sidebarName: "Inventory sync",
|
||||
permission: "inventory_sync.inventory.view",
|
||||
content: <InventoryPage />,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -117,7 +117,12 @@ function StoragePage() {
|
||||
export class WebPlugin extends libPlugin.BaseWebPlugin {
|
||||
async init() {
|
||||
this.pages = [
|
||||
{ path: "/storage", sidebarName: "Storage", content: <StoragePage/> },
|
||||
{
|
||||
path: "/storage",
|
||||
sidebarName: "Storage",
|
||||
permission: "subspace_storage.storage.view",
|
||||
content: <StoragePage/>,
|
||||
},
|
||||
];
|
||||
|
||||
this.storage = new Map();
|
||||
|
||||
Reference in new issue
Block a user