yavsc/src/Yavsc/Services/IFileSystemAuthManager.cs

31 lines
793 B
C#
Raw Normal View History

2023-03-19 17:57:55 +00:00
2019-08-04 11:45:00 +02:00
using System.Security.Claims;
2023-03-19 17:57:55 +00:00
using Microsoft.Extensions.FileProviders;
2019-08-03 11:43:14 +02:00
2019-08-04 11:45:00 +02:00
namespace Yavsc.Services
{
2019-08-03 11:43:14 +02:00
[Flags]
public enum FileAccessRight {
None = 0,
Read = 1,
Write = 2
}
public interface IFileSystemAuthManager {
string NormalizePath (string path);
/// <summary>
/// A full path starts with a slash,
/// continues with a user name,
/// and returns true by the helper fonction :
/// </summary>
/// <param name="user"></param>
/// <param name="normalizedFullPath"></param>
/// <returns></returns>
FileAccessRight GetFilePathAccess(ClaimsPrincipal user, IFileInfo file);
2019-08-03 11:43:14 +02:00
void SetAccess (long circleId, string normalizedFullPath, FileAccessRight access);
}
}