aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorOgnjen Cirkovic <ciraboxkg@gmail.com>2022-06-06 03:02:27 +0200
committerOgnjen Cirkovic <ciraboxkg@gmail.com>2022-06-06 03:02:27 +0200
commit2a9823c8f24fca0db3782131dc2f5cfbc452d3d4 (patch)
tree67b0bbc77118e3f08c5b59fa2b98de3bf5aaaf0f /backend
parent06d148b911beb964724897ab99eb2992b12be809 (diff)
Ispravka kada korisnik pristupa datasetu preko linka.
Diffstat (limited to 'backend')
-rw-r--r--backend/api/api/Services/FileService.cs2
1 files changed, 1 insertions, 1 deletions
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();