[WIP] user file auth

This commit is contained in:
Paul Schneider 2019-08-14 14:11:27 +01:00
commit 95e797e4f8
3 changed files with 25 additions and 10 deletions

View file

@ -20,7 +20,7 @@ namespace Yavsc.AuthorizationHandlers {
if (!fileContext.Path.StartsWith ("/"))
context.Fail ();
else {
var rights = _authManager.GetFilePathAccess (context.User, fileContext.Path.Substring (1));
var rights = _authManager.GetFilePathAccess (context.User, fileContext.Path);
if ((rights & FileAccessRight.Read) > 0)
context.Succeed (requirement);
else context.Fail ();