From f181c3041e2a08eaddd774c21359493ceddbf3aa Mon Sep 17 00:00:00 2001 From: Shannon Date: Tue, 22 Mar 2016 12:35:59 +0100 Subject: [PATCH] Ensures Admin creation has translation section --- .../Persistence/Migrations/Initial/BaseDataCreation.cs | 1 + src/Umbraco.Core/Services/UserService.cs | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs index 5e07a617d4..7e70adb10f 100644 --- a/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs +++ b/src/Umbraco.Core/Persistence/Migrations/Initial/BaseDataCreation.cs @@ -174,6 +174,7 @@ namespace Umbraco.Core.Persistence.Migrations.Initial _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Settings }); _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Users }); _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Forms }); + _database.Insert("umbracoUser2app", "user", false, new User2AppDto { UserId = 0, AppAlias = Constants.Applications.Translation }); } private void CreateCmsPropertyTypeGroupData() diff --git a/src/Umbraco.Core/Services/UserService.cs b/src/Umbraco.Core/Services/UserService.cs index 19e17d8b0b..40007c5b90 100644 --- a/src/Umbraco.Core/Services/UserService.cs +++ b/src/Umbraco.Core/Services/UserService.cs @@ -147,9 +147,9 @@ namespace Umbraco.Core.Services IsApproved = true }; //adding default sections content, media + translation - user.AddAllowedSection("content"); - user.AddAllowedSection("media"); - user.AddAllowedSection("translation"); + user.AddAllowedSection(Constants.Applications.Content); + user.AddAllowedSection(Constants.Applications.Media); + user.AddAllowedSection(Constants.Applications.Translation); if (SavingUser.IsRaisedEventCancelled(new SaveEventArgs(user), this)) return user;