feat(call): filter services/list by AccessControl and add services/list-peers opt-in (call/services-list-accesscontrol-filtered)
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user