def METHOD_NAME(cls, cradmin_instance_id, appname, view, viewname):
    def viewwrapper(request, *args, **kwargs):
        request.cradmin_app = cls(appname, request, active_viewname=viewname)
        return has_access_to_cradmin_instance(cradmin_instance_id, cradminview(view))(
            request, *args, **kwargs)
    # Take name and docstring from view
    update_wrapper(viewwrapper, view, updated=())
    return viewwrapper