MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / allows_view

Method allows_view

atomic-identity/src/delegation.rs:258–266  ·  view source on GitHub ↗

Check if this scope allows access to a view.

(&self, view_name: &str)

Source from the content-addressed store, hash-verified

256
257 /// Check if this scope allows access to a view.
258 pub fn allows_view(&self, view_name: &str) -> bool {
259 if self.view_patterns.is_empty() {
260 return true;
261 }
262
263 self.view_patterns
264 .iter()
265 .any(|pattern| Self::matches_pattern(pattern, view_name))
266 }
267
268 /// Simple glob pattern matching (supports * and ?).
269 fn matches_pattern(pattern: &str, value: &str) -> bool {

Callers 1

allowsMethod · 0.80

Calls 2

is_emptyMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected