yavsc/Yavsc/ViewModels/Auth/FileSpotInfo.cs

25 lines
563 B
C#
Raw Normal View History

2017-01-19 12:59:49 +01:00
using System.IO;
using Microsoft.AspNet.Authorization;
2017-10-04 23:53:47 +02:00
using Yavsc.Models.Blog;
2017-01-19 12:59:49 +01:00
2017-01-19 14:32:03 +01:00
namespace Yavsc.ViewModel.Auth {
2017-01-19 12:59:49 +01:00
public class FileSpotInfo : IAuthorizationRequirement
{
2017-01-19 14:32:03 +01:00
public DirectoryInfo PathInfo { get; private set; }
2017-10-04 23:53:47 +02:00
public FileSpotInfo(string path, BlogPost b) {
2017-01-19 12:59:49 +01:00
PathInfo = new DirectoryInfo(path);
AuthorId = b.AuthorId;
BlogEntryId = b.Id;
}
public string AuthorId { get; private set; }
public long BlogEntryId { get; private set; }
}
}