Implementing a mini social graph - ruby

I have an application where users of the application can have many contacts ( other users of the application ) related to them. I would like to maintain a relation between a single user and its set of contacts. At any given point of time, I do NOT need to know anything more than the direct set of contacts for a particular user, i.e, contacts of contact of a particular user is not of relevance in this application.
Any suggestion on how to organise this data within the database? Please note that the number of users could go up really high.
Just to add some extra info, the database I am using right now is Mongodb and language being used is Ruby.
The only model right now before thinking of building all these relations is the Users model which stores details of each user registered onto the application. Now as I mentioned above, I need to built the specified relation between the user and its set of contacts. Any help would be highly appreciated.

Related

What is the "customer's user ID"?

In the Preventing duplicate Items article, it mentions that you can use a specific combination of fields to determine if there are duplicate items or not. And specifically OAuth institutions, it says the combination of fields are: customer's user ID and institution_id. I'm confused what the customer's user ID is. I'm not familiar with this identifier. Can somebody explain?
The customer's user ID would be a value in your own application's business logic, not part of the Plaid API. In most Plaid use cases, alongside an Item, you would typically store some kind of user id that associates it with a specific user in your system. The logic here is saying that if the same end user in your system has multiple Items with the same institution, they are probably duplicate Items.

In QuickBase, is there a way to make one field have unique user access?

I'm the QuickBase Admin for my QuickBase app. In the app, there's a dashboard report that's used by individuals with viewer access; that way, they can see their students' data, but can't edit the app, tables, structures, etc.
My app's users want to be able to edit one field with notes on that row's data (each row is a student's data, so they'd want to use that field to add notes on that individual), but viewers don't have editing/data entry access tn any column. Is there a way for users to have editing/data entry access to one field, but not the others?
I know with Tableau and other BI software, this isn't possible, but I wanted to ask since my users asked.
Thank you for reading.
Sure you can.
Actually there are more ways to implement this needs.
My opinion better if you create a new table and make a relationship between the student data and a (new) Notes table and you will be able to setup edit rights eg by record owner.
An other way, you can allow the edit right for your users and you can make a restriction on field level. In this case you have to go through on each field and at the Advanced section you will find Permission - Restrict access by role.
Hopefully you do not have a lot of fields :)

How to filter data in CDS(powerapps) to restrict unauthorized users

I have created a custom entity in common data services(CDS) that streams in data from a survey.
I'll however need to give access to the data to various people. In my dataset, I have a column called community, which should represent which people have access to what data based on the community they've entered the column.
How exactly can I filter the data, after it has streamed in to ensure I only give access to people of a particular community. And yes every community is exclusive, no two people can be in two different communities.
I want to filter by the community, such that those in community A see only A and not B or C.
There’s no straight one step OOB configuration to achieve this. Because the row level security depends on the column value ie. community field value of each record.
One way is to create owner teams and add the users to right teams, then the custom entity record has to be owned by respective team - owner team of each custom entity record can be filled/assigned automatically based on the community field value on create using plugin/workflow/Flow.
Most important, in security role for that custom entity - read privilege has to be given only for user level. Assign the security role to Teams.

Generate dynamic form and store the data in Laravel

For a part of my next project I'm looking for the following information.
I'm trying to make an application for something like scouts, all the supervisors will have a user account on the application and the supervisors will be able to manage the members of the scouts. I'm looking for a way to let the supervisor decide what information they would like to store about the member. This will then be converted to a form so they can easily add new members.
What is the best way to make a dynamic form and store the data in a database.
Thanks in advance!
Well there are many ways to do that, so I don't know if this is the best with the little information you give us about your "case scenario".
I'll do create this tables:
forms (hold the form basic info and supervisors reference)
forms_fields (with an Elquent relatinship tipy "belongsTo")
Check Laravel documentation on Eloquent here>

CLP and ACL for multi-tenant app in Parse.com

Imagine a website that agregates online ordering for many restaurants and is built using parse.com.
In parse.com there is a class called Order where all of the orders are stored.
Each order belongs to one, and only one, restaurant.
When querying the Order class, each restaurant can only read (and write) its own orders. A restaurant should not see (and write) orders for other restaurants.
To solve this, I've tried using one role per restaurant and add the restaurant-role to the each restaurants order's ACLs. So I've created one role for each of the Restaurants using the following naming taxonomy: Restaurant-[restaurantObjectId].
I have taken care that user's belong to their respective restaurant-role.
I've also fiddle with Class Level Permissions (CLPs) without results: either total access or total lack of access, none of access limited to restaurant data.
Any clues?
It seems that one has to have make the Find operation available to the Public. Otherwise it gives the not authorized error.

Resources