catching moves to same parent

This commit is contained in:
Kim 2023-07-13 10:16:31 +02:00
parent ba23280693
commit b5b7f65384
2 changed files with 3 additions and 0 deletions

View File

@ -54,6 +54,8 @@ public static class SessionMethods
var user = session?.User; var user = session?.User;
var installation = Db.GetInstallationById(installationId); var installation = Db.GetInstallationById(installationId);
var parent = Db.GetFolderById(parentId); var parent = Db.GetFolderById(parentId);
if(installation.ParentId == parentId) return false;
return user is not null return user is not null
&& installation is not null && installation is not null

View File

@ -55,6 +55,7 @@ public class S3Cmd
<AllowedHeader>*</AllowedHeader> <AllowedHeader>*</AllowedHeader>
</CORSRule> </CORSRule>
</CORSConfiguration>"; </CORSConfiguration>";
var result = await Run(bucketName, "mb"); var result = await Run(bucketName, "mb");
var setCors = await Run(bucketName, "PutBucketCors", cors); var setCors = await Run(bucketName, "PutBucketCors", cors);