Check if a permission is granted.
bool checkPermission(String domain, [Object? data]) { return _permissions[domain]?.any((element) => element.match(data)) ?? false; }