mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-07-15 21:03:47 +00:00
Merge commit from fork
This commit is contained in:
@@ -20,6 +20,14 @@ export async function resolveHostById(
|
||||
hostId: number,
|
||||
userId: string,
|
||||
): 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 hostResults = await SimpleDBOps.select(
|
||||
|
||||
Reference in New Issue
Block a user