mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 15:15:24 +00:00
feat: rebuild workspaces as the reference plugin
This commit is contained in:
1 parent
d774df8b41
commit
f217d8db89
79 files changed
+32995
-2184
No files matched your search
@@ -37,6 +37,7 @@
|
||||
|
||||
import semver from "semver";
|
||||
import { pluginLogger } from "../utils/logger.js";
|
||||
import { runAsActor } from "./actor.js";
|
||||
import type { PluginManifest, PluginServiceRequire } from "./manifest.js";
|
||||
|
||||
export interface ServiceRegistration {
|
||||
@@ -386,9 +387,14 @@ async function invokeGuarded(
|
||||
}
|
||||
|
||||
try {
|
||||
const result = await (
|
||||
implementation as (...callArgs: unknown[]) => unknown
|
||||
).apply(registration.implementation, args);
|
||||
// Runs as the user the permission was checked for, so the provider reads
|
||||
// the same user from ctx.currentActor() and cannot be told another one.
|
||||
const result = await runAsActor(userId, "service", () =>
|
||||
(implementation as (...callArgs: unknown[]) => unknown).apply(
|
||||
registration.implementation,
|
||||
args,
|
||||
),
|
||||
);
|
||||
|
||||
await context.audit({
|
||||
userId,
|
||||
|
||||
Reference in new issue
Block a user