ACS checks can now be applied to form actions

This commit is contained in:
Bryan Ashby 2019-06-15 18:42:15 -06:00
parent 64c06d8809
commit 42ac6f8689
No known key found for this signature in database
GPG Key ID: B49EB437951D2542
2 changed files with 19 additions and 1 deletions

View File

@ -10,6 +10,23 @@ This document attempts to track **major** changes and additions in ENiGMA½. For
+ `oputil.js user 2fa USERNAME TYPE` enables 2-factor authentication for a user.
* `oputil.js user info USERNAME --security` can now display additional security information such as 2FA/OTP.
* `oputil.js fb scan --quick` is now the default. Override with `--full-scan`.
* ACS checks can now be applied to form actions. For example:
```hjson
{
value: { command: "SEC" }
action: [
{
// secure connections can go here
acs: SC
action: @menu:securityMenu
}
{
// non-secure connections
action: @menu:secureConnectionRequired
}
]
}
```
## 0.0.9-alpha
* Development is now against Node.js 10.x LTS. While other Node.js series may continue to work, you're own your own and YMMV!

View File

@ -172,7 +172,8 @@ function handleAction(client, formData, conf, cb) {
return cb(Errors.MissingParam('Missing config'));
}
const actionAsset = asset.parseAsset(conf.action);
const action = client.acs.getConditionalValue(conf.action, 'action'); // handle any conditionals
const actionAsset = asset.parseAsset(action);
if(!_.isObject(actionAsset)) {
return cb(Errors.Invalid('Unable to parse "conf.action"'));
}