fix(#1661): show default-perms agents with effective values in perms tab
This commit is contained in:
parent
24cbafc64a
commit
789ecd86f6
6 changed files with 193 additions and 24 deletions
|
|
@ -579,11 +579,19 @@ impl Coordinator {
|
|||
.map(|c| (c.as_str(), c.description()))
|
||||
.collect();
|
||||
let assignments = crate::capabilities::read();
|
||||
// Best-effort roster (sync path); on a contended cache miss we
|
||||
// emit explicit keys only — the HTTP refetch fills the rest in.
|
||||
let roster = self.live_container_names_blocking().unwrap_or_default();
|
||||
// Capability default is "no extra caps" — empty default slice.
|
||||
let (agents, effective) =
|
||||
crate::dashboard::permissions::roster_and_effective(roster, &assignments, &[]);
|
||||
self.emit_dashboard_event(DashboardEvent::CapabilitiesChanged {
|
||||
seq: self.next_seq(),
|
||||
caps,
|
||||
descriptions,
|
||||
assignments,
|
||||
agents,
|
||||
effective,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -598,11 +606,19 @@ impl Coordinator {
|
|||
.map(|g| (g.as_str(), g.description()))
|
||||
.collect();
|
||||
let assignments = crate::tool_groups::read();
|
||||
let roster = self.live_container_names_blocking().unwrap_or_default();
|
||||
let (agents, effective) = crate::dashboard::permissions::roster_and_effective(
|
||||
roster,
|
||||
&assignments,
|
||||
&crate::dashboard::permissions::tool_group_default_names(),
|
||||
);
|
||||
self.emit_dashboard_event(DashboardEvent::ToolGroupsChanged {
|
||||
seq: self.next_seq(),
|
||||
groups,
|
||||
descriptions,
|
||||
assignments,
|
||||
agents,
|
||||
effective,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue