mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-23 21:13:35 +08:00
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:
@@ -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; }
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user