find method
Finds permissions matching the given input string.
Matches can be by key, group, or keywords.
Implementation
Set<PermissionDef> find(String input) {
final matches = <PermissionDef>{};
for (var entry in entries) {
if (entry.matches(input)) {
matches.add(entry);
} else if ({
entry.group,
...entry.keywords,
}.any((e) => e.startsWith(input))) {
matches.add(entry);
}
}
return matches;
}