WIP
This commit is contained in:
parent
96dcf5c4f4
commit
0d8fd0606f
60 changed files with 874 additions and 209 deletions
17
Yavsc/ViewModels/Auth/Handlers/ViewFileHandler.cs
Normal file
17
Yavsc/ViewModels/Auth/Handlers/ViewFileHandler.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using Microsoft.AspNet.Authorization;
|
||||
|
||||
namespace Yavsc.ViewModels.Auth.Handlers
|
||||
{
|
||||
public class ViewFileHandler : AuthorizationHandler<ViewRequirement, ViewFileContext>
|
||||
{
|
||||
protected override void Handle(AuthorizationContext context, ViewRequirement requirement, ViewFileContext fileContext)
|
||||
{
|
||||
// TODO file access rules
|
||||
if (fileContext.Path.StartsWith("/pub/"))
|
||||
context.Succeed(requirement);
|
||||
else {
|
||||
context.Succeed(requirement);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue