Context
I’m building a dashboard of projects. Projects are created by the administrator for member and members can only access their project.
Current situation
Since project _owner field is assigned to the admin and not the member, it is not possible to protect entries with permission read/update “member author”. This happens a lot when you start generating content for your users rendering the permission feature useless.
The workaround I’m using to protect the data is to set everything in private data (admin only) and create endpoints that filter the projects with [currentUser.id.](currentUser.id
Feature)
That really feels like reinventing the wheel.
[Feature](currentUser.id
Feature) Request
Adding a new parameter to WixDataOption https://www.wix.com/corvid/reference/wix-data.html#WixDataOptions to let us set the owner of a given request
let options = {
"owner": selectedMember._id
};
wixData.get("myCollection", "00001", options).then(...);
wixData.insert("myCollection", toInsert, options).then(...);
wixData.query("myCollection").find(options).then(...);
wixData.update("myCollection", toUpdate, options).then(...);
-
Is there already a similar solution?
-
Would that request be possible to build?
-
Would you consider it?
#data