RSPAMD_SYMBOL_GROUP_DISABLED = (1 << 0),
RSPAMD_SYMBOL_GROUP_ONE_SHOT = (1 << 1),
RSPAMD_SYMBOL_GROUP_UNGROUPED = (1 << 2),
+ RSPAMD_SYMBOL_GROUP_PUBLIC = (1 << 3),
};
/**
}
}
+ if ((elt = ucl_object_lookup (obj, "public")) != NULL) {
+ if (ucl_object_type (elt) != UCL_BOOLEAN) {
+ g_set_error (err,
+ CFG_RCL_ERROR,
+ EINVAL,
+ "public attribute is not boolean for symbol: '%s'",
+ key);
+
+ return FALSE;
+ }
+ if (ucl_object_toboolean (elt)) {
+ gr->flags |= RSPAMD_SYMBOL_GROUP_PUBLIC;
+ }
+ }
+
+ if ((elt = ucl_object_lookup (obj, "private")) != NULL) {
+ if (ucl_object_type (elt) != UCL_BOOLEAN) {
+ g_set_error (err,
+ CFG_RCL_ERROR,
+ EINVAL,
+ "private attribute is not boolean for symbol: '%s'",
+ key);
+
+ return FALSE;
+ }
+ if (!ucl_object_toboolean (elt)) {
+ gr->flags |= RSPAMD_SYMBOL_GROUP_PUBLIC;
+ }
+ }
+
elt = ucl_object_lookup (obj, "description");
if (elt) {
description = ucl_object_tostring (elt);