refactoring

This commit is contained in:
Kim 2023-07-13 10:18:34 +02:00
parent b5b7f65384
commit 2aae717859
1 changed files with 1 additions and 2 deletions

View File

@ -55,10 +55,9 @@ public static class SessionMethods
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; if(installation == null || installation.ParentId == parentId) return false;
return user is not null return user is not null
&& installation is not null
&& user.HasWriteAccess && user.HasWriteAccess
&& user.HasAccessTo(installation) && user.HasAccessTo(installation)
&& user.HasAccessTo(parent) && user.HasAccessTo(parent)