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:
Sebastien Ros
2010-05-12 15:26:52 -07:00
parent 9689f2af41
commit f6c170679e
7 changed files with 77 additions and 3 deletions

View File

@@ -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,