So, I found something that kind of bugged me when using episerver search on a staging environment.
What we did was we removed the "Everyone" group from read permissions (which effektivley forces you to login to be able to view the site).
What I then noticed was that my Search refused to return any hits at all, even tho the index looked fine and dandy.
I then noticed that in the PrincipalInfo.Current.RoleList I didnt have our actual roles (That we're calling WebAdmin and WebEditor). What showed up was CmsAdmins and CmsEditors.
So the roles in my RoleList wasn't actually my roles, it was my virual roles that I had from web.config:
<virtualRoles addClaims="true"><providers><add name="Administrators" type="EPiServer.Security.WindowsAdministratorsRole, EPiServer.Framework" /><add name="Everyone" type="EPiServer.Security.EveryoneRole, EPiServer.Framework" /><add name="Authenticated" type="EPiServer.Security.AuthenticatedRole, EPiServer.Framework" /><add name="Anonymous" type="EPiServer.Security.AnonymousRole, EPiServer.Framework" /><add name="CmsAdmins" type="EPiServer.Security.MappedRole, EPiServer.Framework" roles="WebAdmins, Administrators" mode="Any" /><add name="CmsEditors" type="EPiServer.Security.MappedRole, EPiServer.Framework" roles="WebEditors" mode="Any" /><add name="Creator" type="EPiServer.Security.CreatorRole, EPiServer" /><add name="PackagingAdmins" type="EPiServer.Security.MappedRole, EPiServer.Framework" roles="WebAdmins, Administrators" mode="Any" /></providers></virtualRoles>
While in the index, it indexes the actual roles in the EPISERVER_SEARCH_ACL field:
[[G:Administrators]] [[G:LoginUser]] [[G:WebAdmins]] [[G:WebEditors]]
But my question finally is: Is it really supposed to work like this? Shouldn't PrincipalInfo.Current return the actual roles? Or the indexingservice index the virtual roles instead of the roles?
Maybe this can help someone else with this issue, because this nearly drove me crazy :P
/Mats