'Return a user-readable string indicating the errors in the input ACL,
or None if there are no errors.'

def extract_acl_and_report_errors(self, req):

    acl_header = 'x-account-access-control'
    acl_data = req.headers.get(acl_header)
    result = parse_acl(version=2, data=acl_data)
    if (result is None):
        return ('Syntax    error    in    input    (%r)' % acl_data)
    tempauth_acl_keys = 'admin    read-write    read-only'.split()
    for key in result:
        if (key not in tempauth_acl_keys):
            return ("Key    '%s'    not    recognized" % key)
    for key in tempauth_acl_keys:
        if (key not in result):
            continue
        if (not isinstance(result[key], list)):
            return ("Value    for    key    '%s'    must    be    a    list" % key)
        for grantee in result[key]:
            if (not isinstance(grantee, six.string_types)):
                return ("Elements    of    '%s'    list    must    be    strings" % key)
    internal_hdr = (get_sys_meta_prefix('account') + 'core-access-control')
    req.headers[internal_hdr] = req.headers.pop(acl_header)
    return None
