mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-16 05:13:36 +00:00
Merge commit from fork
This commit is contained in:
@@ -20,6 +20,14 @@ export async function resolveHostById(
|
|||||||
hostId: number,
|
hostId: number,
|
||||||
userId: string,
|
userId: string,
|
||||||
): Promise<SSHHost | null> {
|
): Promise<SSHHost | null> {
|
||||||
|
const { PermissionManager } = await import("../utils/permission-manager.js");
|
||||||
|
const access = await PermissionManager.getInstance().canAccessHost(
|
||||||
|
userId,
|
||||||
|
hostId,
|
||||||
|
"read",
|
||||||
|
);
|
||||||
|
if (!access.hasAccess) return null;
|
||||||
|
|
||||||
const db = getDb();
|
const db = getDb();
|
||||||
|
|
||||||
const hostResults = await SimpleDBOps.select(
|
const hostResults = await SimpleDBOps.select(
|
||||||
|
|||||||
Reference in New Issue
Block a user