(request, domain, instance_id)
return form
Fetches a form and verifies that the user can access it.
Fetches a form and verifies that the user can access it.
Fetches a form and verifies that the user can access it .
def safely_get_form(request, domain, instance_id):
    """Fetches a form and verifies that the user can access it."""
    form = get_form_or_404(domain, instance_id)
    if not can_edit_form_location(domain, request.couch_user, form):
        raise location_restricted_exception(request)
    return form
def safely_get_form ( request , domain , instance_id ) : form = get_form_or_404 ( domain , instance_id ) if not can_edit_form_location ( domain , request . couch_user , form ) : raise location_restricted_exception ( request ) return form