CacheControl / CacheControl/json-rules-engine

Use fact as params input to another fact?

Open
#308 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
3.1k
Forks
507
PR merge metrics
No merged PRs in 30d

Description

I've looked across the documentation, examples and existing issues and, if this has been previously discussed, I'm missing it. Is it possible to use one or more Fact as `params` input to another fact?

This is a little domain specific but, for example, if I have a fact that gets a "section" related to another object (via `params`) and then another fact that verifies "section" access control, can I do something like this as a fact?
```js
{
// Has permission to section?
fact: 'has-permission',
params: {
fact: 'related-section',
params: {
id: 'xyz123'
}
},
operator: 'equal',
value: true
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the documentation, examples, and existing issues referenced in the report for how fact params are resolved. Trace the existing fact evaluation entry point to determine whether nested fact inputs are supported. Done means either documenting the supported usage and limitations or defining the implementation scope for nested fact params.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.