Hi! Please help me implement the private account feature. This allows users to turn on a toggle switch and keep their account private, with all their data private for other users except friends. If the account is private, another user can send a subscription request, which they can then approve or reject. I also need to set up the “friends” section. I have subscriptions and subscribers, and friends are when you follow each other. I’m having trouble implementing this too… I’d be very grateful for your help!
Hello @olga.solovyeva60
You can actually set this up pretty cleanly using a mix of database fields + relationships.
Private Account
-
Add a true/false field in your Users collection →
is_private -
Toggle switch just updates this field
Friends System
-
Create a many-to-many relationship on Users →
friends -
This will store mutual connections (i.e. both users follow each other)
Friend Requests
-
You can have a separate collection like
friend_requests(sender, receiver, status) -
When accepted → add both users to each other’s
friendslist
Controlling Access (important part)
Instead of heavy filters on the page, handle it at the action level:
-
When a user clicks on someone’s profile:
-
Add a condition:
-
If
is_private = false→ allow access -
If
is_private = true→ check ifCurrent User > friends contains This User
-
-
-
If yes → go to profile
-
If no → show request/send request screen
This way you’re not overloading the page with filters, and it’s a more solid approach — basically a simple relationship-based access control (ReBAC) setup.
Once a request is accepted, the user gets added to friends, and access works automatically ![]()
If you get stuck on structuring it, feel free to DM me — happy to help further or jump in if you need hands-on support.