Acl bugfix

## Fix a small bug in the ACL code
After renaming some fields in the database schema we got a bug in the ACL code that prevents a object from being set to public. This PR fixes that bug ans also adds a test to catch it in the future.

@onager for review