Permissions for database

Hi,

We have a website with a database and we would like to add some permissions to it.
Is it possible that some users can only read some of the content of the database? Or do we need to create a second database on another page with other permissions?

Thank you
Ruben

When you setup the dataset mode you set it up for all users of that dataset. You can change the mode of it through the dataset itself and you can also change the permissions of the dataset on your page too.

If your existing dataset mode is read and write and you want it to be read only, then you can change the mode easily, however that will make all users of that dataset able to read it only and it will also affect anything on your website that you have connected to that dataset like user input forms or repeaters/tables with displayed data etc.

You can’t however have a dataset setup with more than just the one mode, to do that option you will need to make a couple of datasets on the same page or different pages that are setup for the correct mode that you need it for.

You can have multiple datasets on any page, you don’t have to have one dataset per page only.

https://support.wix.com/en/article/working-with-dataset-modes-and-collection-permissions
https://support.wix.com/en/article/about-collection-permissions
https://support.wix.com/en/article/changing-your-database-collection-permissions

Hi,

Thank you for your feedback
Would it be possible to add a column in the database where you can select which type of user has acces to that specific ID (so for each new row which is added in the database)

Best,
Ruben

You can have different roles for different members on your site.
https://support.wix.com/en/article/creating-member-roles-6943237
https://support.wix.com/en/article/managing-your-member-roles
https://support.wix.com/en/article/limiting-pages-on-your-site-to-specific-members-member-roles

You can add that into your code too.
https://www.wix.com/corvid/reference/wix-users.User.html#UserRole
https://www.wix.com/corvid/reference/wix-users.User.html#getRoles
https://www.wix.com/corvid/reference/wix-users.html#currentUser

Previous post that you can use too.
https://www.wix.com/corvid/forum/community-discussion/get-the-information-of-user-roles