[WIP] user file auth
This commit is contained in:
parent
e261a61208
commit
95e797e4f8
3 changed files with 25 additions and 10 deletions
|
|
@ -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 ();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue