diff --git a/.idea/.idea.Abyss/.idea/workspace.xml b/.idea/.idea.Abyss/.idea/workspace.xml
index daf4c55..4abe013 100644
--- a/.idea/.idea.Abyss/.idea/workspace.xml
+++ b/.idea/.idea.Abyss/.idea/workspace.xml
@@ -9,11 +9,7 @@
-
-
-
-
-
+
@@ -232,7 +228,7 @@
-
+
diff --git a/Abyss.sln.DotSettings.user b/Abyss.sln.DotSettings.user
index d7b6e6e..dcf236a 100644
--- a/Abyss.sln.DotSettings.user
+++ b/Abyss.sln.DotSettings.user
@@ -5,6 +5,7 @@
ForceIncluded
ForceIncluded
ForceIncluded
+ ForceIncluded
ForceIncluded
ForceIncluded
ForceIncluded
\ No newline at end of file
diff --git a/Abyss/Components/Controllers/Security/RootController.cs b/Abyss/Components/Controllers/Security/RootController.cs
index 01eea08..71b0cc4 100644
--- a/Abyss/Components/Controllers/Security/RootController.cs
+++ b/Abyss/Components/Controllers/Security/RootController.cs
@@ -109,6 +109,20 @@ public class RootController(ILogger logger, UserService userServ
}
}
+ [HttpPost("init")]
+ public async Task Init(string token, string path, int owner)
+ {
+ if (userService.Validate(token, Ip) != 1)
+ {
+ logger.LogInformation("Init authorization failed for token: {Token}", token);
+ return StatusCode(401, "Unauthorized");
+ }
+
+ var r = await resourceService.Initialize(path, token, owner, Ip);
+ if (r) return Ok(r);
+ return StatusCode(403, new { message = "403 Denied" });
+ }
+
private static string ConvertToLsPerms(string permRaw, bool isDirectory)
{
// expects format like "rw,r-,r-"