add greetingsettings/isDefault

This commit is contained in:
Anton Suhorukov 2022-10-14 13:00:22 +03:00
parent 421ae1885d
commit 481d1a1de0

View File

@ -33,7 +33,8 @@ public class GreetingSettingsController : BaseSettingsController
private readonly MessageService _messageService;
private readonly TenantManager _tenantManager;
private readonly PermissionContext _permissionContext;
private readonly TenantInfoSettingsHelper _tenantInfoSettingsHelper;
private readonly TenantInfoSettingsHelper _tenantInfoSettingsHelper;
private readonly IConfiguration _configuration;
public GreetingSettingsController(
TenantInfoSettingsHelper tenantInfoSettingsHelper,
@ -43,18 +44,26 @@ public class GreetingSettingsController : BaseSettingsController
PermissionContext permissionContext,
WebItemManager webItemManager,
IMemoryCache memoryCache,
IHttpContextAccessor httpContextAccessor) : base(apiContext, memoryCache, webItemManager, httpContextAccessor)
IHttpContextAccessor httpContextAccessor,
IConfiguration configuration) : base(apiContext, memoryCache, webItemManager, httpContextAccessor)
{
_tenantInfoSettingsHelper = tenantInfoSettingsHelper;
_messageService = messageService;
_tenantManager = tenantManager;
_permissionContext = permissionContext;
_permissionContext = permissionContext;
_configuration = configuration;
}
[HttpGet("greetingsettings")]
public ContentResult GetGreetingSettings()
{
return new ContentResult { Content = Tenant.Name };
}
[HttpGet("greetingsettings/isDefault")]
public bool GreetingSettingsIsDefault()
{
return Tenant.Name == (_configuration["web:portal-name"] ?? "Cloud Office Applications");
}
[HttpPost("greetingsettings")]