No matching content is returned if RequiredRole is ""

Found in

EPiServer.ContentDeliveryApi 1.0.1

Fixed in

EPiServer.ContentDeliveryApi 2.1.0

Created

Oct 09, 2018

Updated

Oct 30, 2018

State

Closed,


Description

Steps to reproduce:
1. Customize settings to set RequiredRole = "" in code:

context.Services.Configure<ContentApiConfiguration>(config =>
{ config.Default().SetMultiSiteFilteringEnabled(true)
                                .SetMinimumRoles(null)
                                .SetRequiredRole(""); 
});

2. Set Read right for WebAdmins, WebEditors and Everyone on all content.

3. Get access token for user in WebAdmins group and send GET request for searching data:

http://vnlabvm52:10000/CMS11Aug18/api/episerver/v2.0/search/content

Expected:
Matching data is returned. Status code is 200.

Actual:
Returns code 200 but total matching = 0.

Note: If I set RequiredRole as null, it works as expected.