feat(call): filter services/list by AccessControl and add services/list-peers opt-in (call/services-list-accesscontrol-filtered)

This commit is contained in:
2026-06-28 22:02:09 +00:00
parent 2902ccff18
commit 877c923244
3 changed files with 409 additions and 0 deletions

View File

@@ -42,6 +42,12 @@ pub enum AccessResult {
Forbidden(String),
}
impl AccessResult {
pub fn is_allowed(&self) -> bool {
matches!(self, AccessResult::Allowed)
}
}
impl AccessControl {
pub fn has_restrictions(&self) -> bool {
!self.required_scopes.is_empty()