Initial version of access control. Local rule rewriting works.