mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +09:00
Merge remote-tracking branch 'upstream/master' into refactor/plugin-hooks-v2
# Conflicts: # packages/lib/src/data/messages_plugin.ts # packages/web_ui/src/components/PluginViewPage.tsx # test/lib/plugin.js
This commit is contained in:
commit
db84455c34
37 files changed
+573
-60
No files matched your search
@@ -1,6 +1,8 @@
|
||||
import { Type, Static } from "@sinclair/typebox";
|
||||
import { jsonArray } from "./composites.js";
|
||||
import type { PluginNodeEnvInfo } from "../plugin.js";
|
||||
import { Address, MessageRequest } from "./messages_core.js";
|
||||
import type { IUser } from "./UserDetails.js";
|
||||
|
||||
/* This is similar to other plugin definitions but with lots removed */
|
||||
export class PluginDetails {
|
||||
@@ -91,3 +93,14 @@ export class PluginInstallRequest {
|
||||
return this.pluginPackage;
|
||||
}
|
||||
}
|
||||
|
||||
export class UpdateAllRequest {
|
||||
declare ["constructor"]: typeof UpdateAllRequest;
|
||||
static type = "request" as const;
|
||||
static src = "control" as const;
|
||||
static dst = ["controller", "host"] as const;
|
||||
static permission(user: IUser, message: MessageRequest) {
|
||||
user.checkPermission(message.dst.type === Address.host ? "core.host.update" : "core.controller.update");
|
||||
user.checkPermission("core.plugin.update");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user