Add full permissions editor window (#71)

The "Rechte" top menu's four previously-disabled items now open a tabbed
editor matching the real TS3 client's window: Server Gruppen, Client
Rechte, Channel Rechte, Channel Gruppen, Channel Client Rechte. For each
tab you pick a group/channel/client (or combination), see its currently
assigned permissions in a filterable table, add new ones from a searchable
catalog, and remove existing ones.

Connector: new servergrouppermlist/channelgrouppermlist/channelpermlist/
clientpermlist/channelclientpermlist request handling (unified behind one
"permlist <scope> ..." stdin command and a single-target pending-list
mechanism, mirroring the existing permoverview pattern's name-resolution
cache) plus servergroupaddperm/-delperm, channelgroupaddperm/-delperm,
channeladdperm/-delperm, clientaddperm/-delperm, channelclientaddperm/
-delperm for mutating them, and a "permissionlist" command to expose the
full permission catalog (needed for the "add permission" picker).

Verified against the real server: permission list/catalog requests reach
the server correctly. The test guest account turns out to lack rights to
see permission names/IDs at all (server replies with only the hierarchy's
group-boundary markers, no populated permid/permname) - same class of
account-permission ceiling as banlist/file uploads/etc. earlier in this
project, not a bug in this feature. Add/remove wire commands support both
numeric permid and permsid addressing per the protocol, so this should
work fully for an account with actual view rights (e.g. the real server
admin), even though it couldn't be exercised end-to-end with this guest
account. Full interactive verification (list, add, remove) done in demo
mode instead.

"Rechteübersicht" (viewing another client's computed effective
permissions with grant provenance) stays disabled - a materially
different feature the connector doesn't support.
This commit is contained in:
Moepchi committed 2026-08-06 00:16:30 +02:00
1 parent 6d6803d9b3
commit ea7b97b161
7 files changed
+1045 -11

No files matched your search

+90
View File
@@ -1234,6 +1234,96 @@
border-radius: 2px;
}
.ts-perms-editor-dialog {
width: 820px;
max-width: 95vw;
}
.ts-perms-editor-tabs {
display: flex;
border-bottom: 1px solid var(--border-soft);
flex-wrap: wrap;
}
.ts-perms-editor-tab {
background: none;
border: none;
padding: 0.5rem 0.8rem;
cursor: pointer;
color: var(--text-muted);
border-bottom: 2px solid transparent;
}
.ts-perms-editor-tab-active {
color: var(--text);
border-bottom-color: var(--accent, #4a9eff);
}
.ts-perms-editor-body {
display: flex;
gap: 0.75rem;
align-items: flex-start;
}
.ts-perms-editor-picker {
width: 180px;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.ts-perms-editor-list {
list-style: none;
margin: 0;
padding: 0;
max-height: 380px;
overflow-y: auto;
border: 1px solid var(--border-soft);
border-radius: 4px;
}
.ts-perms-editor-list li {
padding: 0.3rem 0.5rem;
border-bottom: 1px solid var(--border-soft);
}
.ts-perms-editor-list li:last-child {
border-bottom: none;
}
.ts-perms-editor-list-empty {
color: var(--text-muted);
font-size: 12px;
}
.ts-perms-editor-selected {
font-weight: bold;
color: var(--accent, #4a9eff);
}
.ts-perms-editor-client-picker {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.ts-perms-editor-main {
flex: 1;
min-width: 0;
}
.ts-perms-editor-add-form {
display: flex;
gap: 0.4rem;
align-items: center;
flex-wrap: wrap;
margin-bottom: 0.5rem;
padding: 0.4rem;
border: 1px solid var(--border-soft);
border-radius: 4px;
}
.ts-server-protocol-log-line {
padding: 0.15rem 0.4rem;
border-bottom: 1px solid var(--border-soft);
+444 -4
View File
@@ -336,6 +336,14 @@ interface FileListEntry {
timestamp: string;
}
interface PermissionCatalogEntry {
id: number;
name: string;
description: string;
}
type PermScope = "server" | "channelgroup" | "channel" | "client" | "channelclient";
interface ClientConnectionInfoData {
clientId: number;
pingMs: number | null;
@@ -1996,6 +2004,336 @@ function ServerIconsDialog({
);
}
/** The five permission-editor tabs from the real TS3 "Rechte" window - each
* is a different scope the ts3 protocol tracks assigned permissions under. */
const PERM_SCOPES: { scope: PermScope; labelKey: string }[] = [
{ scope: "server", labelKey: "permsEditor.tab.server" },
{ scope: "client", labelKey: "permsEditor.tab.client" },
{ scope: "channel", labelKey: "permsEditor.tab.channel" },
{ scope: "channelgroup", labelKey: "permsEditor.tab.channelgroup" },
{ scope: "channelclient", labelKey: "permsEditor.tab.channelclient" },
];
function PermissionsEditorDialog({
initialScope,
channelGroups,
serverGroups,
channels,
clients,
entries,
catalog,
onSelectTarget,
onLoadCatalog,
onAdd,
onRemove,
onClose,
}: {
initialScope: PermScope;
channelGroups: GroupEntry[] | null;
serverGroups: GroupEntry[] | null;
channels: ChannelInfo[];
clients: ClientInfo[];
entries: PermissionOverviewEntry[] | null;
catalog: PermissionCatalogEntry[] | null;
onSelectTarget: (scope: PermScope, id1: number, id2?: number) => void;
onLoadCatalog: () => void;
onAdd: (scope: PermScope, ids: number[], permId: number, value: number, negated: boolean, skip: boolean) => void;
onRemove: (scope: PermScope, ids: number[], permId: number) => void;
onClose: () => void;
}) {
const t = useT();
const backdrop = useBackdropDismiss(onClose);
const [scope, setScope] = useState<PermScope>(initialScope);
const [groupId, setGroupId] = useState<number | null>(null);
const [channelId, setChannelId] = useState<number | null>(null);
const [clientDbIdInput, setClientDbIdInput] = useState("");
const [filter, setFilter] = useState("");
const [showAddForm, setShowAddForm] = useState(false);
const [addPermSearch, setAddPermSearch] = useState("");
const [addPermId, setAddPermId] = useState<number | null>(null);
const [addValue, setAddValue] = useState("1");
const [addNegated, setAddNegated] = useState(false);
const [addSkip, setAddSkip] = useState(false);
const groupList = scope === "server" ? serverGroups : scope === "channelgroup" ? channelGroups : null;
// (ids, ready) for the currently selected target under the active tab -
// ready is false while a required piece (channel/client) hasn't been picked yet.
const target: { id1: number; id2?: number } | null = (() => {
const clientDbId = parseInt(clientDbIdInput, 10);
switch (scope) {
case "server":
case "channelgroup":
return groupId !== null ? { id1: groupId } : null;
case "channel":
return channelId !== null ? { id1: channelId } : null;
case "client":
return !Number.isNaN(clientDbId) ? { id1: clientDbId } : null;
case "channelclient":
return channelId !== null && !Number.isNaN(clientDbId) ? { id1: channelId, id2: clientDbId } : null;
default:
return null;
}
})();
const load = (next: { scope: PermScope; groupId?: number | null; channelId?: number | null; clientDbId?: number }) => {
// The catalog doubles as the name->id lookup the delete button needs, so
// fetch it alongside the first load rather than only when "+ Hinzufügen"
// is opened - onLoadCatalog is idempotent (a no-op once already cached).
onLoadCatalog();
const s = next.scope;
const gid = next.groupId !== undefined ? next.groupId : groupId;
const cid = next.channelId !== undefined ? next.channelId : channelId;
const cldbid = next.clientDbId !== undefined ? next.clientDbId : parseInt(clientDbIdInput, 10);
if ((s === "server" || s === "channelgroup") && gid !== null && gid !== undefined) {
onSelectTarget(s, gid);
} else if (s === "channel" && cid !== null && cid !== undefined) {
onSelectTarget(s, cid);
} else if (s === "client" && !Number.isNaN(cldbid)) {
onSelectTarget(s, cldbid);
} else if (s === "channelclient" && cid !== null && cid !== undefined && !Number.isNaN(cldbid)) {
onSelectTarget(s, cid, cldbid);
}
};
const filtered = entries?.filter((e) => e.name.toLowerCase().includes(filter.toLowerCase())) ?? null;
const showNegated = scope === "server";
const showSkip = scope === "server" || scope === "client";
const catalogFiltered = (catalog ?? [])
.filter((p) => p.name.toLowerCase().includes(addPermSearch.toLowerCase()))
.slice(0, 200); // keep the <select> responsive against the ~500-entry catalog
return (
<div className="ts-dialog-backdrop" {...backdrop}>
<div className="ts-dialog ts-perms-editor-dialog" onClick={(e) => e.stopPropagation()}>
<div className="ts-dialog-titlebar">
<span>{t("permsEditor.title")}</span>
<button onClick={onClose} title={t("dialog.close")}>
✕
</button>
</div>
<div className="ts-perms-editor-tabs">
{PERM_SCOPES.map((tab) => (
<button
key={tab.scope}
className={`ts-perms-editor-tab${scope === tab.scope ? " ts-perms-editor-tab-active" : ""}`}
onClick={() => {
setScope(tab.scope);
setShowAddForm(false);
}}
>
{t(tab.labelKey)}
</button>
))}
</div>
<div className="ts-dialog-body ts-perms-editor-body">
<div className="ts-perms-editor-picker">
{groupList && (
<ul className="ts-perms-editor-list">
{groupList.length === 0 && <li className="ts-perms-editor-list-empty">{t("groupAssign.empty")}</li>}
{groupList.map((g) => (
<li key={g.id}>
<button
className={`ts-link-button${groupId === g.id ? " ts-perms-editor-selected" : ""}`}
onClick={() => {
setGroupId(g.id);
load({ scope, groupId: g.id });
}}
>
{g.name}
</button>
</li>
))}
</ul>
)}
{(scope === "channel" || scope === "channelclient") && (
<ul className="ts-perms-editor-list">
{channels.map((c) => (
<li key={c.id}>
<button
className={`ts-link-button${channelId === c.id ? " ts-perms-editor-selected" : ""}`}
onClick={() => {
setChannelId(c.id);
load({ scope, channelId: c.id });
}}
>
{c.name}
</button>
</li>
))}
</ul>
)}
{(scope === "client" || scope === "channelclient") && (
<div className="ts-perms-editor-client-picker">
<label className="ts-dialog-field">
{t("permsEditor.clientDbId")}
<input
value={clientDbIdInput}
onChange={(e) => setClientDbIdInput(e.target.value)}
onKeyDown={(e) => e.key === "Enter" && load({ scope })}
placeholder="1"
/>
</label>
<button onClick={() => load({ scope })}>{t("permsEditor.load")}</button>
{clients.length > 0 && (
<select
value=""
onChange={(e) => {
const id = parseInt(e.target.value, 10);
if (!Number.isNaN(id)) {
setClientDbIdInput(String(id));
load({ scope, clientDbId: id });
}
}}
>
<option value="" disabled>
{t("permsEditor.pickOnlineClient")}
</option>
{clients.map((c) => (
<option key={c.id} value={c.databaseId}>
{c.name}
</option>
))}
</select>
)}
</div>
)}
</div>
<div className="ts-perms-editor-main">
{!target ? (
<div className="ts-connection-info-loading">{t("permsEditor.pickTarget")}</div>
) : (
<>
<div className="ts-dialog-row">
<label className="ts-dialog-field ts-dialog-field-grow">
{t("clientLog.filter")}
<input value={filter} onChange={(e) => setFilter(e.target.value)} />
</label>
<button
onClick={() => {
setShowAddForm((v) => !v);
if (!catalog) onLoadCatalog();
}}
>
+ {t("permsEditor.addPermission")}
</button>
</div>
{showAddForm && (
<form
className="ts-perms-editor-add-form"
onSubmit={(e) => {
e.preventDefault();
if (addPermId === null || !target) return;
const value = parseInt(addValue, 10);
if (Number.isNaN(value)) return;
const ids = target.id2 !== undefined ? [target.id1, target.id2] : [target.id1];
onAdd(scope, ids, addPermId, value, addNegated, addSkip);
setShowAddForm(false);
setAddPermSearch("");
setAddPermId(null);
}}
>
<input
placeholder={t("permsEditor.searchPermission")}
value={addPermSearch}
onChange={(e) => setAddPermSearch(e.target.value)}
/>
<select value={addPermId ?? ""} onChange={(e) => setAddPermId(parseInt(e.target.value, 10))}>
<option value="" disabled>
{t("permsEditor.searchPermission")}
</option>
{catalogFiltered.map((p) => (
<option key={p.id} value={p.id} title={p.description}>
{p.name}
</option>
))}
</select>
<input
type="number"
value={addValue}
onChange={(e) => setAddValue(e.target.value)}
style={{ width: "5em" }}
/>
{showNegated && (
<label>
<input type="checkbox" checked={addNegated} onChange={(e) => setAddNegated(e.target.checked)} />
{t("permissionOverview.negated")}
</label>
)}
{showSkip && (
<label>
<input type="checkbox" checked={addSkip} onChange={(e) => setAddSkip(e.target.checked)} />
{t("permissionOverview.skip")}
</label>
)}
<button type="submit" disabled={addPermId === null}>
{t("dialog.ok")}
</button>
</form>
)}
{!entries ? (
<div className="ts-connection-info-loading">{t("connectionInfo.loading")}</div>
) : filtered && filtered.length === 0 ? (
<div className="ts-connection-info-loading">{t("permissionOverview.empty")}</div>
) : (
<div className="ts-permission-overview-scroll">
<table className="ts-ban-list-table">
<thead>
<tr>
<th>{t("permissionOverview.name")}</th>
<th>{t("permissionOverview.value")}</th>
{showNegated && <th>{t("permissionOverview.negated")}</th>}
{showSkip && <th>{t("permissionOverview.skip")}</th>}
<th />
</tr>
</thead>
<tbody>
{filtered!.map((entry, i) => {
const catalogEntry = catalog?.find((p) => p.name === entry.name);
return (
<tr key={`${entry.name}-${i}`} title={entry.description || undefined}>
<td>{entry.name}</td>
<td>{entry.value}</td>
{showNegated && <td>{entry.negated ? "✔️" : ""}</td>}
{showSkip && <td>{entry.skip ? "✔️" : ""}</td>}
<td>
{catalogEntry && (
<button
onClick={() => {
const ids = target.id2 !== undefined ? [target.id1, target.id2] : [target.id1];
onRemove(scope, ids, catalogEntry.id);
}}
title={t("fileBrowser.delete")}
>
🗑
</button>
)}
</td>
</tr>
);
})}
</tbody>
</table>
</div>
)}
</>
)}
</div>
</div>
<div className="ts-dialog-buttons">
<button onClick={() => target && load({ scope })} disabled={!target}>
{t("fileBrowser.refresh")}
</button>
<div className="ts-dialog-buttons-right">
<button onClick={onClose}>{t("dialog.close")}</button>
</div>
</div>
</div>
</div>
);
}
function PermissionOverviewDialog({
entries,
onClose,
@@ -3572,6 +3910,14 @@ function AppInner() {
} | null>(null);
const [permissionOverviewOpen, setPermissionOverviewOpen] = useState(false);
const [permissionOverview, setPermissionOverview] = useState<PermissionOverviewEntry[] | null>(null);
const [permissionsEditorOpen, setPermissionsEditorOpen] = useState(false);
const [permissionsEditorScope, setPermissionsEditorScope] = useState<PermScope>("server");
const [permissionsEditorEntries, setPermissionsEditorEntries] = useState<PermissionOverviewEntry[] | null>(null);
const [permissionsEditorTarget, setPermissionsEditorTarget] = useState<
{ scope: PermScope; id1: number; id2?: number } | null
>(null);
const [permissionCatalog, setPermissionCatalog] = useState<PermissionCatalogEntry[] | null>(null);
const permissionCatalogRequestedRef = useRef(false);
const [fileBrowserTarget, setFileBrowserTarget] = useState<{ channelId: number; channelName: string } | null>(
null
);
@@ -4213,6 +4559,12 @@ function AppInner() {
if (data.cid === 0) handleServerIconsRefresh();
else handleFileBrowserRefresh();
break;
case "permList":
setPermissionsEditorEntries(data.entries);
break;
case "permissionCatalog":
setPermissionCatalog(data.entries);
break;
}
};
@@ -4996,6 +5348,53 @@ function AppInner() {
socketRef.current?.send(JSON.stringify({ type: "getPermissionOverview" }));
};
const handleOpenPermissionsEditor = (scope: PermScope) => {
setPermissionsEditorScope(scope);
setPermissionsEditorEntries(null);
setPermissionsEditorTarget(null);
setPermissionsEditorOpen(true);
// Fetch both lists regardless of the initial tab - the dialog lets the
// user switch to any of the 5 tabs, including the group ones, later.
if (!serverGroups) socketRef.current?.send(JSON.stringify({ type: "getServerGroupList" }));
if (!channelGroups) socketRef.current?.send(JSON.stringify({ type: "getChannelGroupList" }));
};
const handlePermsLoadCatalog = () => {
if (permissionCatalogRequestedRef.current) return;
permissionCatalogRequestedRef.current = true;
socketRef.current?.send(JSON.stringify({ type: "getPermissionCatalog" }));
};
const handlePermsSelectTarget = (scope: PermScope, id1: number, id2?: number) => {
setPermissionsEditorEntries(null);
setPermissionsEditorTarget({ scope, id1, id2 });
socketRef.current?.send(JSON.stringify({ type: "getPermList", scope, id1, id2 }));
};
const handlePermsRefresh = () => {
if (!permissionsEditorTarget) return;
const { scope, id1, id2 } = permissionsEditorTarget;
setPermissionsEditorEntries(null);
socketRef.current?.send(JSON.stringify({ type: "getPermList", scope, id1, id2 }));
};
const handlePermsAdd = (
scope: PermScope,
ids: number[],
permId: number,
value: number,
negated: boolean,
skip: boolean
) => {
socketRef.current?.send(JSON.stringify({ type: "addPermission", scope, ids, permId, value, negated, skip }));
window.setTimeout(handlePermsRefresh, 300);
};
const handlePermsRemove = (scope: PermScope, ids: number[], permId: number) => {
socketRef.current?.send(JSON.stringify({ type: "removePermission", scope, ids, permId }));
window.setTimeout(handlePermsRefresh, 300);
};
const handleChannelContextMenu = (e: React.MouseEvent, channelId: number, channelName: string) => {
e.preventDefault();
const x = Math.min(e.clientX, window.innerWidth - 220);
@@ -5388,20 +5787,44 @@ function AppInner() {
</span>
{rightsMenuOpen && (
<div className="ts-menu">
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
<button
className="ts-menu-item"
onClick={() => {
handleOpenPermissionsEditor("server");
setRightsMenuOpen(false);
}}
>
<span className="ts-menu-item-icon">🏷️</span>
<span className="ts-menu-item-label">{t("menu.rights.serverGroups")}</span>
</button>
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
<button
className="ts-menu-item"
onClick={() => {
handleOpenPermissionsEditor("channelgroup");
setRightsMenuOpen(false);
}}
>
<span className="ts-menu-item-icon">🎖️</span>
<span className="ts-menu-item-label">{t("menu.rights.channelGroups")}</span>
</button>
<div className="ts-menu-separator" />
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
<button
className="ts-menu-item"
onClick={() => {
handleOpenPermissionsEditor("client");
setRightsMenuOpen(false);
}}
>
<span className="ts-menu-item-icon">🔐</span>
<span className="ts-menu-item-label">{t("menu.rights.serverPermissions")}</span>
</button>
<button className="ts-menu-item" disabled title={t("clientContext.notSupported")}>
<button
className="ts-menu-item"
onClick={() => {
handleOpenPermissionsEditor("channel");
setRightsMenuOpen(false);
}}
>
<span className="ts-menu-item-icon">🔑</span>
<span className="ts-menu-item-label">{t("menu.rights.channelPermissions")}</span>
</button>
@@ -5966,6 +6389,23 @@ function AppInner() {
/>
)}
{permissionsEditorOpen && (
<PermissionsEditorDialog
initialScope={permissionsEditorScope}
channelGroups={channelGroups}
serverGroups={serverGroups}
channels={channels}
clients={clients}
entries={permissionsEditorEntries}
catalog={permissionCatalog}
onSelectTarget={handlePermsSelectTarget}
onLoadCatalog={handlePermsLoadCatalog}
onAdd={handlePermsAdd}
onRemove={handlePermsRemove}
onClose={() => setPermissionsEditorOpen(false)}
/>
)}
{fileBrowserTarget && (
<FileBrowserDialog
channelName={fileBrowserTarget.channelName}
+80
View File
@@ -101,6 +101,56 @@ function demoNowTimestamp(): string {
return new Date().toISOString().slice(0, 19).replace("T", " ");
}
interface DemoPermEntry {
name: string;
description: string;
value: number;
negated: boolean;
skip: boolean;
}
// A small fake permission catalog (real TS3 servers expose ~500 of these) -
// enough for the permissions editor's "add permission" picker to be usable.
const DEMO_PERMISSION_CATALOG: { id: number; name: string; description: string }[] = [
{ id: 1, name: "b_client_info_view", description: "View own client info" },
{ id: 2, name: "b_client_permissionoverview_view", description: "View permission overview" },
{ id: 3, name: "i_channel_join_power", description: "Power to join channels" },
{ id: 4, name: "i_client_talk_power", description: "Talk power" },
{ id: 5, name: "b_client_use_priority_speaker", description: "Use priority speaker" },
{ id: 6, name: "i_client_max_channel_subscriptions", description: "Max channel subscriptions" },
{ id: 7, name: "b_channel_join_permanent", description: "Join permanent channels" },
{ id: 8, name: "b_client_kick_from_channel", description: "Kick client from channel" },
{ id: 9, name: "b_client_kick_from_server", description: "Kick client from server" },
{ id: 10, name: "b_client_ban_client", description: "Ban client" },
{ id: 11, name: "i_channel_create_modify_power", description: "Power to create/modify channels" },
{ id: 12, name: "b_virtualserver_modify_name", description: "Modify server name" },
{ id: 13, name: "b_ft_file_upload", description: "Upload files" },
{ id: 14, name: "b_ft_file_download", description: "Download files" },
];
// Keyed by "<scope>:<id1>:<id2 ?? ->" - the fake permission set currently
// assigned to one server group / channel group / channel / client /
// channel+client combination.
const DEMO_PERM_LISTS: Record<string, DemoPermEntry[]> = {
"server:1:-": [
{ name: "b_client_kick_from_server", description: "Kick client from server", value: 1, negated: false, skip: false },
{ name: "b_client_ban_client", description: "Ban client", value: 1, negated: false, skip: false },
],
"server:4:-": [
{ name: "i_channel_join_power", description: "Power to join channels", value: 25, negated: false, skip: false },
],
"channelgroup:1:-": [
{ name: "i_channel_create_modify_power", description: "Power to create/modify channels", value: 75, negated: false, skip: false },
],
"client:1:-": [
{ name: "b_client_info_view", description: "View own client info", value: 1, negated: false, skip: false },
],
};
function demoPermKey(scope: string, id1: number, id2?: number): string {
return `${scope}:${id1}:${id2 ?? "-"}`;
}
const SELF_ID = 101;
/**
@@ -423,6 +473,36 @@ export class DemoSocket {
);
break;
}
case "getPermissionCatalog": {
this.after(300, () => this.emit({ type: "permissionCatalog", entries: DEMO_PERMISSION_CATALOG }));
break;
}
case "getPermList": {
const key = demoPermKey(msg.scope, msg.id1, msg.id2);
this.after(300, () =>
this.emit({ type: "permList", scope: msg.scope, id1: msg.id1, id2: msg.id2 ?? null, entries: DEMO_PERM_LISTS[key] ?? [] })
);
break;
}
case "addPermission": {
const [id1, id2] = msg.ids as number[];
const key = demoPermKey(msg.scope, id1, id2);
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
const name = catalogEntry?.name ?? `#${msg.permId}`;
const description = catalogEntry?.description ?? "";
const list = (DEMO_PERM_LISTS[key] ?? []).filter((e) => e.name !== name);
list.push({ name, description, value: msg.value, negated: !!msg.negated, skip: !!msg.skip });
DEMO_PERM_LISTS[key] = list;
break;
}
case "removePermission": {
const [id1, id2] = msg.ids as number[];
const key = demoPermKey(msg.scope, id1, id2);
const catalogEntry = DEMO_PERMISSION_CATALOG.find((p) => p.id === msg.permId);
const name = catalogEntry?.name ?? `#${msg.permId}`;
if (DEMO_PERM_LISTS[key]) DEMO_PERM_LISTS[key] = DEMO_PERM_LISTS[key].filter((e) => e.name !== name);
break;
}
case "getFileList": {
const key = demoFileKey(msg.channelId, msg.path);
this.after(300, () =>
+26
View File
@@ -411,6 +411,19 @@ const translations: Record<Lang, Record<string, string>> = {
"permissionOverview.negated": "Negiert",
"permissionOverview.skip": "Skip",
"permsEditor.title": "Rechte",
"permsEditor.tab.server": "Server Gruppen",
"permsEditor.tab.client": "Client Rechte",
"permsEditor.tab.channel": "Channel Rechte",
"permsEditor.tab.channelgroup": "Channel Gruppen",
"permsEditor.tab.channelclient": "Channel Client Rechte",
"permsEditor.clientDbId": "Eindeutige Client-DB-ID:",
"permsEditor.load": "Laden",
"permsEditor.pickOnlineClient": "Oder Online-Client wählen...",
"permsEditor.pickTarget": "Bitte links eine Gruppe/einen Channel wählen bzw. eine Client-ID eingeben.",
"permsEditor.addPermission": "Hinzufügen",
"permsEditor.searchPermission": "Recht suchen...",
"dialog.ok": "OK",
"channelContext.files": "Dateien...",
"fileBrowser.title": "Dateitransfers",
@@ -889,6 +902,19 @@ const translations: Record<Lang, Record<string, string>> = {
"permissionOverview.negated": "Negated",
"permissionOverview.skip": "Skip",
"permsEditor.title": "Permissions",
"permsEditor.tab.server": "Server Groups",
"permsEditor.tab.client": "Client Permissions",
"permsEditor.tab.channel": "Channel Permissions",
"permsEditor.tab.channelgroup": "Channel Groups",
"permsEditor.tab.channelclient": "Channel Client Permissions",
"permsEditor.clientDbId": "Unique client DB ID:",
"permsEditor.load": "Load",
"permsEditor.pickOnlineClient": "Or pick an online client...",
"permsEditor.pickTarget": "Pick a group/channel on the left, or enter a client ID.",
"permsEditor.addPermission": "Add",
"permsEditor.searchPermission": "Search permission...",
"dialog.ok": "OK",
"channelContext.files": "Files...",
"fileBrowser.title": "File Transfers",