User Permissions - gravbox/Gravitybox.Datastore GitHub Wiki
Every object can also have a permission field associated with it. This is used to design a custom permission system based on some object field. A use set is a list of integers. The object field defined as the permission field will store a set of user ID value for each value of the object permission field. This functionality is only used in searching when the query has a user set defined. If no user ID is defined in the query then permissions are not applied to the filter set and all repository items are returned. For example, if a repository has a key ObjectId defined as its permission field, it can be queried with a user ID list to filter the results to only objects that that have the passed-in user id associated with it.