From 2a9823c8f24fca0db3782131dc2f5cfbc452d3d4 Mon Sep 17 00:00:00 2001 From: Ognjen Cirkovic Date: Mon, 6 Jun 2022 03:02:27 +0200 Subject: Ispravka kada korisnik pristupa datasetu preko linka. --- backend/api/api/Services/FileService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/api/api/Services/FileService.cs b/backend/api/api/Services/FileService.cs index 6ef74ca1..e5b7945f 100644 --- a/backend/api/api/Services/FileService.cs +++ b/backend/api/api/Services/FileService.cs @@ -28,7 +28,7 @@ namespace api.Services public string GetFilePath(string id, string uploaderId) { FileModel file; - if (_dataset.Find(x=>x.fileId==id && x.isPublic==true).FirstOrDefault()!=null) + if (_dataset.Find(x=>x.fileId==id && (x.isPublic==true ||x.accessibleByLink==true)).FirstOrDefault()!=null) file = _file.Find(x => x._id == id).FirstOrDefault(); else file = _file.Find(x => x._id == id && x.uploaderId == uploaderId).FirstOrDefault(); -- cgit v1.2.3