Luciano Schiavo wrote:
I would make an entity for permissions like this:
contentid, personid, isauthor, permissons
where permissions means "members of group x", "only me", "friends", "public" and that kind of stuff.
When someone else shares, it will be a new similar row (with isauthor false) and that person can propagate a few more levels.
To check if someone can read, you need to see if he is in personid, if he is friend with someone in a row of type friends, or member of a group in a row of type group, and so on.
Of course you need to split very well the information so this table doesn't get huge.
Hi Nuno,
that is the idea. I have the customer that invite a friend. From this point they can interact between them like social network. Which approach is more suitable ?
that is the idea. I have the customer that invite a friend. From this point they can interact between them like social network. Which approach is more suitable ?
I would make an entity for permissions like this:
contentid, personid, isauthor, permissons
where permissions means "members of group x", "only me", "friends", "public" and that kind of stuff.
When someone else shares, it will be a new similar row (with isauthor false) and that person can propagate a few more levels.
To check if someone can read, you need to see if he is in personid, if he is friend with someone in a row of type friends, or member of a group in a row of type group, and so on.
Of course you need to split very well the information so this table doesn't get huge.