mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 05:23:33 +08:00
IShellSettingsEventHandler to modify tenants in the running application
Added new methods for altering the tenants: Remove and Update --HG-- branch : dev
This commit is contained in:
@@ -16,6 +16,7 @@ namespace Orchard.MultiTenancy.Controllers {
|
||||
public AdminController(ITenantService tenantService, IOrchardServices orchardServices, ShellSettings shellSettings) {
|
||||
_tenantService = tenantService;
|
||||
_thisShellSettings = shellSettings;
|
||||
|
||||
Services = orchardServices;
|
||||
T = NullLocalizer.Instance;
|
||||
}
|
||||
@@ -36,6 +37,7 @@ namespace Orchard.MultiTenancy.Controllers {
|
||||
try {
|
||||
if (!Services.Authorizer.Authorize(Permissions.ManageTenants, T("Couldn't create tenant")))
|
||||
return new HttpUnauthorizedResult();
|
||||
|
||||
_tenantService.CreateTenant(
|
||||
new ShellSettings {
|
||||
Name = viewModel.Name,
|
||||
|
Reference in New Issue
Block a user