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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user