Comment Something this reminds me off (Score 1) 50
Back in the 80s I built a persistent OO systems with sophisticated ACL. We implemented it by finagling the message dispatch mechanism to make select methods on guarded classes error out instead of doing what they normally did. That was on Objective C so it was fairly easy to get to the dispatch table. Some equivalent of that plus a filter on what objects were returned pretty well did it.