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