diff --git a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs index e0e5245734..e80faaa44a 100644 --- a/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs +++ b/src/Umbraco.Core/Persistence/Repositories/Implement/MemberGroupRepository.cs @@ -22,7 +22,7 @@ namespace Umbraco.Core.Persistence.Repositories.Implement protected override IMemberGroup PerformGet(int id) { var sql = GetBaseQuery(false); - sql.Where(GetBaseWhereClause(), new { Id = id }); + sql.Where(GetBaseWhereClause(), new { id = id }); var dto = Database.Fetch(SqlSyntax.SelectTop(sql, 1)).FirstOrDefault(); diff --git a/src/Umbraco.Tests/UI/LegacyDialogTests.cs b/src/Umbraco.Tests/UI/LegacyDialogTests.cs index ba7c4f0e66..99391104ab 100644 --- a/src/Umbraco.Tests/UI/LegacyDialogTests.cs +++ b/src/Umbraco.Tests/UI/LegacyDialogTests.cs @@ -23,8 +23,6 @@ namespace Umbraco.Tests.UI } } - [TestCase(typeof(MemberGroupTasks), Constants.Applications.Members)] - [TestCase(typeof(dictionaryTasks), Constants.Applications.Settings)] [TestCase(typeof(macroTasks), Constants.Applications.Packages)] [TestCase(typeof(CreatedPackageTasks), Constants.Applications.Packages)] public void Check_Assigned_Apps_For_Tasks(Type taskType, string app) diff --git a/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml b/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml index 52abf37133..0ebdb5cd48 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/create/UI.Release.xml @@ -15,50 +15,6 @@ - -
membergroup
- /create/simple.ascx - - - -
- -
membergroup
- /create/simple.ascx - - - -
- -
Stylesheet
- /create/simple.ascx - - - -
- -
Stylesheet
- /create/simple.ascx - - - - -
- -
Stylesheet editor egenskab
- /create/simple.ascx - - - - -
- -
Stylesheet editor egenskab
- /create/simple.ascx - - - -
Package
/create/simple.ascx diff --git a/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml b/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml index 82adc71525..d6be62ff88 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/create/UI.xml @@ -15,50 +15,6 @@
- -
membergroup
- /create/simple.ascx - - - -
- -
membergroup
- /create/simple.ascx - - - -
- -
Stylesheet
- /create/simple.ascx - - - -
- -
Stylesheet
- /create/simple.ascx - - - - -
- -
Stylesheet editor egenskab
- /create/simple.ascx - - - - -
- -
Stylesheet editor egenskab
- /create/simple.ascx - - - -
Package
/create/simple.ascx diff --git a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml index 97f187938f..3c4ca4a74d 100644 --- a/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml +++ b/src/Umbraco.Web.UI/Umbraco/config/lang/en_us.xml @@ -292,6 +292,7 @@ Create a new member All Members + Member groups have no additional properties for editing. Where do you want to create the new %0% diff --git a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs index 9dcaa00e14..98114f0664 100644 --- a/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs +++ b/src/Umbraco.Web/Editors/BackOfficeServerVariables.cs @@ -224,6 +224,10 @@ namespace Umbraco.Web.Editors "memberTypeApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetAllTypes()) }, + { + "memberGroupApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( + controller => controller.GetAllGroups()) + }, { "updateCheckApiBaseUrl", _urlHelper.GetUmbracoApiServiceBaseUrl( controller => controller.GetCheck()) diff --git a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs index f64d8dc529..68a3c4de75 100644 --- a/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs +++ b/src/Umbraco.Web/Models/Mapping/MemberMapperProfile.cs @@ -142,8 +142,7 @@ namespace Umbraco.Web.Models.Mapping .ForMember(dest => dest.Icon, opt => opt.Ignore()) .ForMember(dest => dest.Trashed, opt => opt.Ignore()) .ForMember(dest => dest.ParentId, opt => opt.Ignore()) - .ForMember(dest => dest.Alias, opt => opt.Ignore()) - .ForMember(dest => dest.Path, opt => opt.Ignore()); + .ForMember(dest => dest.Alias, opt => opt.Ignore()); } } } diff --git a/src/Umbraco.Web/Umbraco.Web.csproj b/src/Umbraco.Web/Umbraco.Web.csproj index cb645f0b34..789f53272a 100644 --- a/src/Umbraco.Web/Umbraco.Web.csproj +++ b/src/Umbraco.Web/Umbraco.Web.csproj @@ -1248,9 +1248,7 @@ - - FeedProxy.aspx ASPXCodeBehind diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/MemberGroupTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/MemberGroupTasks.cs deleted file mode 100644 index 2a603544bf..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/MemberGroupTasks.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Linq; -using System.Web.Security; -using Umbraco.Core; -using Umbraco.Web; -using Umbraco.Web.Composing; -using Umbraco.Web._Legacy.UI; - -namespace umbraco -{ - public class MemberGroupTasks : LegacyDialogTask - { - public override bool PerformSave() - { - Roles.CreateRole(Alias); - _returnUrl = $"members/EditMemberGroup.aspx?id={System.Web.HttpContext.Current.Server.UrlEncode(Alias)}"; - return true; - } - - public override bool PerformDelete() - { - var roleDeleted = false; - - // only built-in roles can be deleted - if (Roles.Provider.Name == Constants.Conventions.Member.UmbracoRoleProviderName) - { - var group = Current.Services.MemberGroupService.GetByName(Alias); - if (group != null) - { - Current.Services.MemberGroupService.Delete(group); - } - } - - // Need to delete the member group from any content item that has it assigned in public access settings - var publicAccessService = Current.Services.PublicAccessService; - var allPublicAccessRules = publicAccessService.GetAll(); - - // Find only rules which have the current role name (alias) assigned to them - var rulesWithDeletedRoles = allPublicAccessRules.Where(x => x.Rules.Any(r => r.RuleValue == Alias)); - - var contentService = Current.Services.ContentService; - foreach (var publicAccessEntry in rulesWithDeletedRoles) - { - var contentItem = contentService.GetById(publicAccessEntry.ProtectedNodeId); - var rulesToDelete = publicAccessEntry.Rules.ToList(); - foreach (var rule in rulesToDelete) - publicAccessService.RemoveRule(contentItem, rule.RuleType, rule.RuleValue); - } - - return roleDeleted; - } - - private string _returnUrl = ""; - - public override string ReturnUrl => _returnUrl; - - public override string AssignedApp => Constants.Applications.Members.ToString(); - } -} diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/create/dictionaryTasks.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/create/dictionaryTasks.cs deleted file mode 100644 index 17bfde7fb3..0000000000 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/create/dictionaryTasks.cs +++ /dev/null @@ -1,57 +0,0 @@ -using System; -using Umbraco.Core.Logging; -using Umbraco.Web.UI; -using Umbraco.Core; -using Umbraco.Web; -using Umbraco.Web.Composing; -using Umbraco.Web._Legacy.UI; - -namespace umbraco -{ - public class dictionaryTasks : LegacyDialogTask - { - public override bool PerformSave() - { - //check to see if key is already there - if (Current.Services.LocalizationService.DictionaryItemExists(Alias)) - return false; - - // Create new dictionary item if name no already exist - if (ParentID > 0) - { - var di = Current.Services.LocalizationService.GetDictionaryItemById(ParentID); - if (di == null) throw new NullReferenceException("No dictionary item found by id " + ParentID); - var item = Current.Services.LocalizationService.CreateDictionaryItemWithIdentity(Alias, di.Key); - _returnUrl = string.Format("settings/editDictionaryItem.aspx?id={0}", item.Id); - } - else - { - var item = Current.Services.LocalizationService.CreateDictionaryItemWithIdentity(Alias, null); - _returnUrl = string.Format("settings/editDictionaryItem.aspx?id={0}", item.Id); - } - return true; - } - - public override bool PerformDelete() - { - Current.Logger.Debug(TypeID + " " + ParentID + " deleting " + Alias); - var di = Current.Services.LocalizationService.GetDictionaryItemById(ParentID); - if (di == null) return true; - - Current.Services.LocalizationService.Delete(di); - return true; - } - - private string _returnUrl = ""; - - public override string ReturnUrl - { - get { return _returnUrl; } - } - - public override string AssignedApp - { - get { return Constants.Applications.Settings.ToString(); } - } - } -}