Local Passwords validation
This commit is contained in:
parent
ce8f3ebce0
commit
8132db37d0
163 changed files with 1812 additions and 4772 deletions
|
|
@ -1,6 +1,8 @@
|
|||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Threading.Tasks;
|
||||
using Yavsc.Helpers;
|
||||
using Yavsc.Models;
|
||||
using Yavsc.ViewModels.UserFiles;
|
||||
|
||||
namespace Yavsc.ViewComponents
|
||||
|
|
@ -8,13 +10,25 @@ namespace Yavsc.ViewComponents
|
|||
|
||||
public class DirectoryViewComponent : ViewComponent
|
||||
{
|
||||
private readonly UserManager<ApplicationUser> _userManager;
|
||||
private readonly SignInManager<ApplicationUser> _signInManager;
|
||||
public DirectoryViewComponent(UserManager<ApplicationUser> userManager,
|
||||
SignInManager<ApplicationUser> signInManager)
|
||||
{
|
||||
_userManager = userManager;
|
||||
_signInManager = signInManager;
|
||||
}
|
||||
|
||||
public async Task<IViewComponentResult> InvokeAsync(string dirname)
|
||||
{
|
||||
string uid = ViewContext.HttpContext.User.GetUserId();
|
||||
|
||||
IViewComponentResult result = null;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
result = View(new UserDirectoryInfo(AbstractFileSystemHelpers.UserFilesDirName, User.Identity.Name, dirname));
|
||||
});
|
||||
|
||||
result = View(new UserDirectoryInfo(
|
||||
AbstractFileSystemHelpers.UserFilesDirName,
|
||||
uid, dirname));
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue