MCPcopy Create free account
hub / github.com/dfinity/orbit / validate

Method validate

core/station/impl/src/models/request_specifier.rs:30–46  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

28
29impl ModelValidator<ValidationError> for UserSpecifier {
30 fn validate(&self) -> Result<(), ValidationError> {
31 match self {
32 UserSpecifier::Any => Ok(()),
33 UserSpecifier::Group(group_ids) => {
34 for group_id in group_ids {
35 EnsureUserGroup::id_exists(group_id)?;
36 }
37 Ok(())
38 }
39 UserSpecifier::Id(user_ids) => {
40 for user_id in user_ids {
41 EnsureUser::id_exists(user_id)?;
42 }
43 Ok(())
44 }
45 }
46 }
47}
48
49#[storable]

Calls

no outgoing calls

Tested by

no test coverage detected