1
0
Fork 0
forked from wry/wry

config: add uid client criteria

This commit is contained in:
Julian Orth 2025-05-03 12:48:44 +02:00
parent 9bf79bf23c
commit 587ffc7ee5
13 changed files with 63 additions and 2 deletions

View file

@ -95,6 +95,13 @@ impl Rule for ClientRule {
}
};
}
macro_rules! value {
($ty:ident, $field:ident) => {
if let Some(value) = match_.$field {
all.push(m(ClientCriterion::$ty(value)));
}
};
}
macro_rules! bool {
($ty:ident, $field:ident) => {
if let Some(value) = &match_.$field {
@ -113,6 +120,7 @@ impl Rule for ClientRule {
value_ref!(SandboxAppIdRegex, sandbox_app_id_regex);
value_ref!(SandboxInstanceId, sandbox_instance_id);
value_ref!(SandboxInstanceIdRegex, sandbox_instance_id_regex);
value!(Uid, uid);
bool!(Sandboxed, sandboxed);
Some(())
}