Fix category missing when user don't have permission to edit. Fixes #525

This should be able to fix #525 .
WIP. Needs test.