Added store functionality based on backoffice user (to be revisited as a lot of it may be shareable) and also added a new members service method for membergroups.

This commit is contained in:
Emma Garland
2020-12-08 17:18:22 +00:00
parent cea1ed9771
commit 205edf57b7
10 changed files with 620 additions and 367 deletions

View File

@@ -938,6 +938,20 @@ namespace Umbraco.Core.Services.Implement
}
}
/// <summary>
/// Returns a strongly typed list of all member groups
/// </summary>
/// <returns></returns>
public IEnumerable<IMemberGroup> GetAllRolesTyped()
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))
{
scope.ReadLock(Constants.Locks.MemberTree);
return _memberGroupRepository.GetMany().Select(x=>x).Distinct();
}
}
public IEnumerable<string> GetAllRoles(int memberId)
{
using (var scope = ScopeProvider.CreateScope(autoComplete: true))