From 30a8ac75ec5f1eb49b98f05ad6b5fa7c67e94f95 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 10 Feb 2017 10:51:34 +0100 Subject: [PATCH] restores access to invisible posts --- Yavsc/Controllers/BlogspotController.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Yavsc/Controllers/BlogspotController.cs b/Yavsc/Controllers/BlogspotController.cs index 330f9679..9a36e996 100644 --- a/Yavsc/Controllers/BlogspotController.cs +++ b/Yavsc/Controllers/BlogspotController.cs @@ -52,7 +52,7 @@ namespace Yavsc.Controllers if (usercircles != null) { posts = _context.Blogspot.Include( b => b.Author - ).Include(p=>p.ACL).Where(p=>p.Visible && (p.ACL.Count == 0 || p.ACL.Any(a=> usercircles.Contains(a.CircleId)))); + ).Include(p=>p.ACL).Where(p=> p.AuthorId == uid || p.Visible && (p.ACL.Count == 0 || p.ACL.Any(a=> usercircles.Contains(a.CircleId)))); /* posts = _context.Blogspot.Include( b => b.Author ).Include(p=>p.ACL).Where(p=>p.Visible || p.ACL.Any(a => usercircles.Contains(a.Allowed) @@ -61,7 +61,7 @@ namespace Yavsc.Controllers else { posts = _context.Blogspot.Include( b => b.Author - ).Include(p=>p.ACL).Where(p=>p.Visible && p.ACL.Count == 0); + ).Include(p=>p.ACL).Where(p=>p.AuthorId == uid || p.Visible && p.ACL.Count == 0); } return View(posts