Adding an authentication service, and wiring the authenticated user model object into base viewmodel property, and as property of components that implement ICurrentUser. That's done with SecurityFilter and SecurityModule respectively.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4039779
This commit is contained in:
loudej
2009-11-12 03:46:14 +00:00
parent 1c8cf1da12
commit 51d756a573
14 changed files with 226 additions and 63 deletions

View File

@@ -1,13 +1,15 @@
using System;
using System.Linq;
using System.Web.Mvc;
using Orchard.Data;
using Orchard.Models;
using Orchard.Notify;
using Orchard.Security;
using Orchard.Users.Models;
using Orchard.Users.ViewModels;
namespace Orchard.Users.Controllers {
public class AdminController : Controller {
public class AdminController : Controller, ICurrentUser {
private readonly IModelManager _modelManager;
private readonly IRepository<UserRecord> _userRepository;
private readonly INotifier _notifier;
@@ -62,6 +64,8 @@ namespace Orchard.Users.Controllers {
_notifier.Information("User information updated");
return RedirectToAction("Edit", new { id });
}
public IUser CurrentUser { get; set; }
}
}