Changing CurrentUser to be driven by a property only, removes the ICurrentUser interface. Also adding test infrastructure for roles package.

--HG--
extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4039957
This commit is contained in:
loudej
2009-11-12 19:56:13 +00:00
parent df24fa629a
commit 9bc4af3b80
9 changed files with 85 additions and 20 deletions

View File

@@ -9,7 +9,7 @@ using Orchard.Users.Models;
using Orchard.Users.ViewModels;
namespace Orchard.Users.Controllers {
public class AdminController : Controller, ICurrentUser {
public class AdminController : Controller {
private readonly IModelManager _modelManager;
private readonly IRepository<UserRecord> _userRepository;
private readonly INotifier _notifier;
@@ -23,6 +23,8 @@ namespace Orchard.Users.Controllers {
_notifier = notifier;
}
public IUser CurrentUser { get; set; }
public ActionResult Index() {
var model = new UsersIndexViewModel();
model.Rows = _userRepository.Fetch(x => x.UserName != null)
@@ -65,7 +67,6 @@ namespace Orchard.Users.Controllers {
return RedirectToAction("Edit", new { id });
}
public IUser CurrentUser { get; set; }
}
}