Excuse me, how can I make my published articles visible only to strangers? I want to make a paginated article list. The articles published by everyone are on the same page, but the visibility permissions can be set for the articles published by everyone. Some articles are only visible to friends, some are visible to everyone, and some are only visible to strangers. Visible, for example, A and B are my friends, but C is not. I published an article that is only visible to friends. Then A and B can see the article when they enter the page. C cannot see it. I published an article that is only visible to friends. For articles that are visible to strangers, A and B will not be able to see them when they enter them, but C will be able to see them. How to implement this? It must be able to be paginated
The simple design is a friend table, and the article table has publisher and permission (set who can see) fields.
For example, the query condition for A and B to enter the article page is where permission = all or (the publisher is his friend and the permission is visible to friends)
c enters where permission = all or (published) The person is not your friend and the permission is visible to strangers)
If the amount of data is large, you have to think again