Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
This commit is contained in:
Bjarke Berg
2020-02-10 11:23:23 +01:00
committed by GitHub
parent b850b3c8fe
commit ef7af69731
50 changed files with 371 additions and 172 deletions

View File

@@ -33,6 +33,7 @@ namespace Umbraco.Web.Editors
{
private readonly IMediaFileSystem _mediaFileSystem;
private readonly IUmbracoSettingsSection _umbracoSettingsSection;
private readonly IIOHelper _ioHelper;
public CurrentUserController(
IGlobalSettings globalSettings,
@@ -46,11 +47,13 @@ namespace Umbraco.Web.Editors
IMediaFileSystem mediaFileSystem,
IShortStringHelper shortStringHelper,
UmbracoMapper umbracoMapper,
IUmbracoSettingsSection umbracoSettingsSection)
IUmbracoSettingsSection umbracoSettingsSection,
IIOHelper ioHelper)
: base(globalSettings, umbracoContextAccessor, sqlContext, services, appCaches, logger, runtimeState, umbracoHelper, shortStringHelper, umbracoMapper)
{
_mediaFileSystem = mediaFileSystem;
_umbracoSettingsSection = umbracoSettingsSection ?? throw new ArgumentNullException(nameof(umbracoSettingsSection));
_ioHelper = ioHelper ?? throw new ArgumentNullException(nameof(ioHelper));
}
/// <summary>
@@ -184,7 +187,7 @@ namespace Umbraco.Web.Editors
public async Task<HttpResponseMessage> PostSetAvatar()
{
//borrow the logic from the user controller
return await UsersController.PostSetAvatarInternal(Request, Services.UserService, AppCaches.RuntimeCache, _mediaFileSystem, ShortStringHelper, _umbracoSettingsSection, Security.GetUserId().ResultOr(0));
return await UsersController.PostSetAvatarInternal(Request, Services.UserService, AppCaches.RuntimeCache, _mediaFileSystem, ShortStringHelper, _umbracoSettingsSection, _ioHelper, Security.GetUserId().ResultOr(0));
}
/// <summary>