def __exit__(self, t, value, traceback):
        for field in self.deref_fields:
            self.cls._fields[field]._auto_dereference = True
        return self.cls
should redirect to login if user doesn't have permission.
dataset/ETHPy150Open MongoEngine/mongoengine/mongoengine/context_managers.py/no_dereference.__exit__--crossover with--dataset/ETHPy150Open ofa/connect/open_connect/media/tests/test_views.py/ImageViewsTest.test_promote_image_view_no_permission