Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can profiles be made private? #56

Open
emaadparacha opened this issue Jun 22, 2020 · 15 comments
Open

Can profiles be made private? #56

emaadparacha opened this issue Jun 22, 2020 · 15 comments

Comments

@emaadparacha
Copy link

Right now if someone writes their address and phone number, they're public to the everyone on a live server, whether they are logged in or not. Can the profiles be made private until the person registers or private to only a select few who are in the person's family tree?

@nafiesl
Copy link
Owner

nafiesl commented Jun 22, 2020

Hi @emaadparacha, sure you can. Simply move these routes.
https://github.com/nafiesl/silsilah/blob/master/routes/web.php#L25-L50 into auth middleware route group (except the users.search route, line 32).

Just like we have in these lines.
https://github.com/nafiesl/silsilah/blob/master/routes/web.php#L18-L21

Every time someone search for a profile without login, then click the Show Profile link, they will redirected to the login page.

@emaadparacha
Copy link
Author

Awesome! And is it possible to have only the connections see stuff like address and phone number? So like if someone is my wife or a cousin, only then they can see those fields. This would tie in with #57 where connections would have to be approved, and only that way they can see the information. Would something like that be possible?

@nafiesl
Copy link
Owner

nafiesl commented Jul 17, 2020

Hello @emaadparacha, sorry for being a very slow response in pas view weeks. Regarding your idea.

  1. Only connection can see private info, sure that is possible, but I think it is a quite complex logic to determine who has connections to who, especially of the connection comes from a different family branch. Here is some examples:

screen_20-07-17_001

Or a higher connection

screen_20-07-17_002

I haven't figured out how this user to user connections inside the family tree. Maybe if you or someone can help to figure the logic or even create pull request, I will be very helpful. What do you think, @emaadparacha?

  1. Regarding Approving additions to family trees #57, I will answer on the issue comment.

@emaadparacha
Copy link
Author

Hi @nafiesl , thanks for getting back! You do raise an interesting point about the limits. I was somewhat thinking the following logic:

Everyone's direct descendants (and their descendants) would have access. And access would be mutual (if I have access to someone's information, they have access to mine). This would mean that my son/daughter, their spouses (just their spouses), their children and their spouses, and further down (and also up, my father, grandfather, etc). Spouses' information would be limited to spouses' parents and siblings and their spouses, but not further.

And manually people can choose to add other people within their "close circle" (so as to share information), and remove them if needed.

What do you think? Is that something that's somewhat integrateable, if at all possible?

@emaadparacha
Copy link
Author

Hey @nafiesl , not sure if you were able to review the "blueprint" of sorts, and whether it would be reproduce-able within the code, but just wanted to check in regarding that. Thanks!

@nafiesl
Copy link
Owner

nafiesl commented Aug 18, 2020

Hello @emaadparacha, sorry I missed this issue for a few weeks because quite busy in my office 😅

Regarding your idea, let me rewrite it :

  1. Everyone's direct relation would have mutual access, they can see mine and vice versa.
  2. Son and daughter can have access to their father and mother.
  3. A husband has access to his wife, and vice versa
  4. Siblings can have access to each other.
  5. People can add people to their circle to access their information.

For point 1-4, we need to write the logic to make it automatic (every time we access someone's profile page).
For point 5, we need an additional database table (like user_access or profile_access) to store which person can access which person info. I see point 5 is somewhat related to your idea on this issue #57.

If we implement point 5, then we don't need a complex logic to implement point 1-4, because every time we add a person as our family member we can add them to the table, and everyone can easily allow or block a person from seeing their profile.

Are we have the same point, @emaadparacha? Or did I missed something? Thank you @emaadparacha.

@emaadparacha
Copy link
Author

Hi @nafiesl , thank you so much for taking the time out still!

As for the points you mentioned, that's roughly the idea. But you do raise a good point, if we go with point 5, it kind of covers points 1-4 as well. How easy would that be to implement within it?

@nafiesl
Copy link
Owner

nafiesl commented Aug 19, 2020

I think we can implement this in 2 steps:

Step 1

We implement point 5, where :

  1. user A can request user B as his/her family member, then user B will approve/reject it.
  2. If user B does not have email and password (means user B cannot login).
  3. the request will be approved by the system.
  4. All users can remove their connections if they want.
    Need one PR for this one.

Step 2

After the first step is done, we need somehow to make the family member relation automatically created whenever a user created by other user. Eg: User A creates new User C, then user C will automatically be connected with his/her spouse, child, and parent (direct relation first). And User C will be connected (automatically) with user A as well (the user creator). This need different PR.

Optional (nice to have) Feature

Step 1 will lead us to implement a notification feature on this project, to notify if someone adds us as his/her family member 😅 But this is optional, we can implement it as step 3 if we want.

How is that sound @emaadparacha?

@emaadparacha
Copy link
Author

Hi @nafiesl ,

I like Step 1, since it tackles both the issue of having an account and not having an account. For Step 2, you mean that if User C does not have an account right?
Also Step 3 would be wonderful to track and know whenever new people are created!

@nafiesl
Copy link
Owner

nafiesl commented Aug 20, 2020

you mean that if User C does not have an account right?
Yes, correct @emaadparacha.

Can you help with Step 1, @emaadparacha? I am still occupied on my main job until around the 3rd week of September. I will review your PR once you submit it.

@emaadparacha
Copy link
Author

@nafiesl, Just a tiny disclaimer hahah, I'm not super proficient in Laravel, but I can of course try giving it a shot in my free time and see what comes of it. Thanks again though for the help and good luck with work!! We'll loop back soon then

@nafiesl
Copy link
Owner

nafiesl commented Aug 22, 2020

Hehe, gotcha, @emaadparacha. No thanks to you, you give much attention to this project. I really appreciate it.

@haniefss
Copy link

I think we can implement this in 2 steps:

Step 1

We implement point 5, where :

  1. user A can request user B as his/her family member, then user B will approve/reject it.
  2. If user B does not have email and password (means user B cannot login).
  3. the request will be approved by the system.
  4. All users can remove their connections if they want.
    Need one PR for this one.

Step 2

After the first step is done, we need somehow to make the family member relation automatically created whenever a user created by other user. Eg: User A creates new User C, then user C will automatically be connected with his/her spouse, child, and parent (direct relation first). And User C will be connected (automatically) with user A as well (the user creator). This need different PR.

Optional (nice to have) Feature

Step 1 will lead us to implement a notification feature on this project, to notify if someone adds us as his/her family member 😅 But this is optional, we can implement it as step 3 if we want.

How is that sound @emaadparacha?

Assalamualaikum Pak Nafies, any update on this?
I have privacy concern (live public server) thus I moved entire app behind auth, but still guest can easily register an account and then search for someone. I'm thinking to limit search capability to only return people who have family connection to current user. I think it'll only work if we have that family member approval system ready (to avoid guest creating an account then add family member without approval and be able to search for that person's info).

p.s. great work, barakallah.

@nafiesl
Copy link
Owner

nafiesl commented Mar 23, 2021

Waalaikumussalam @haniefss.

I haven't started working on this one, in fact, I almost forgot about this. I don't know how many people using this project on a live server, me my-self using this only on localhost 😁

OK, I think I can start working on Step 1 around next week. I will mention you and @emaadparacha once the PR is ready for review. To make sure the feature will fit our requirements.

Thanks.

@haniefss
Copy link

Waalaikumussalam @haniefss.

I haven't started working on this one, in fact, I almost forgot about this. I don't know how many people using this project on a live server, me my-self using this only on localhost 😁

OK, I think I can start working on Step 1 around next week. I will mention you and @emaadparacha once the PR is ready for review. To make sure the feature will fit our requirements.

Thanks.

I'm glad that you still maintain this project and willing to work on this feature, I never use laravel before so I'll need sometime to get used to if I were gonna do it myself 😭

I'm thinking to put this live so it'll be a lot easier to collaborate with some (older) family member to complete our family tree, making privacy and security become requirements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants