Merge pull request #10850 from umbraco/v9/bugfix/user-roles-fail-if-0

v9: If you didnt have a member group, restricting acces to the public would always lead to error page
This commit is contained in:
Bjarke Berg
2021-08-13 19:15:43 +02:00
committed by GitHub
2 changed files with 17 additions and 8 deletions

View File

@@ -39,11 +39,6 @@ namespace Umbraco.Cms.Web.Common.Security
var username = currentMember.UserName;
IList<string> userRoles = await memberManager.GetRolesAsync(currentMember);
if (userRoles.Count == 0)
{
return PublicAccessStatus.AccessDenied;
}
if (!currentMember.IsApproved)
{
return PublicAccessStatus.NotApproved;