mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-01 00:42:49 +08:00
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:
1 parent
6d6803d9b3
commit
ea7b97b161
7 files changed
+1045
-11
No files matched your search
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user