def get_is_authorized(request, pid):
    """MNAuthorization.isAuthorized(did, action) -> Boolean."""
    if 'action' not in request.GET:
        raise d1_common.types.exceptions.InvalidRequest(
            0, 'Missing required parameter. required="action"'
        )
    # Convert action string to action level. Raises InvalidRequest if the
    # action string is not valid.
    level = d1_gmn.app.auth.action_to_level(request.GET['action'])
    d1_gmn.app.auth.assert_allowed(request, level, pid)
    return d1_gmn.app.views.util.http_response_with_boolean_true_type()