permission handling

This commit is contained in:
Paul Schneider
2025-02-23 20:23:23 +00:00
parent 04bcecad9e
commit 7ccb9cd1da
27 changed files with 243 additions and 288 deletions

View File

@ -30,7 +30,7 @@ namespace Yavsc.Helpers
{
var userPosts = dbContext.BlogSpot.Include(
b => b.Author
).Where(x => ((x.AuthorId == posterId) && (x.Visible))).ToArray();
).Where(x => ((x.AuthorId == posterId))).ToArray();
return userPosts;
}
else
@ -42,8 +42,7 @@ namespace Yavsc.Helpers
return dbContext.BlogSpot.Include(
b => b.Author
).Include(p => p.ACL).Where(x => x.Author.Id == posterId &&
(x.Visible &&
(x.ACL.Count == 0 || x.ACL.Any(a => readerCirclesMemberships.Contains(a.CircleId)))));
(x.ACL.Count == 0 || x.ACL.Any(a => readerCirclesMemberships.Contains(a.CircleId))));
}