Fix permission check for categories (fixes #5)