webdav portal group permission fix

added logout button
This commit is contained in:
vfedosevich 2015-01-09 04:52:51 -08:00
parent 2ec10f6988
commit e4785dabca
8 changed files with 75 additions and 9 deletions

View file

@ -22,6 +22,7 @@ using WebsitePanel.WebDavPortal.Models;
using System.Collections.Generic;
using WebsitePanel.Providers.OS;
using WebDAV;
using WebsitePanel.WebDavPortal.UI.Routes;
namespace WebsitePanel.WebDavPortal.Controllers
{
@ -50,7 +51,9 @@ namespace WebsitePanel.WebDavPortal.Controllers
if (isAuthenticated)
{
Session[WebDavAppConfigManager.Instance.SessionKeys.ItemId] = exchangeAccount.ItemId;
model.Groups = ES.Services.Organizations.GetSecurityGroupsByMember(exchangeAccount.ItemId, exchangeAccount.AccountId);
try
{
Session[WebDavAppConfigManager.Instance.SessionKeys.AccountInfo] = model;
@ -65,6 +68,14 @@ namespace WebsitePanel.WebDavPortal.Controllers
return View(new AccountModel { LdapError = "The user name or password is incorrect" });
}
[HttpGet]
public ActionResult Logout()
{
Session[WebDavAppConfigManager.Instance.SessionKeys.AccountInfo] = null;
return RedirectToRoute(AccountRouteNames.Login);
}
private void AutheticationToServicesUsingWebsitePanelUser()
{
var crypto = _kernel.Get<ICryptography>();