Add closure support for `accessControl`

This fixes the issue where the `accessControl` wouldn't accept a closure.
Merge pull request #426 from boekkooi/patch-1

Add closure support for `accessControl`