cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Datatable permission on single entries

fmanniti
10-Marble

Datatable permission on single entries

Is it possible to set permission on datatable single entries?

If I have two users (A and B) and a DataTable which is editable by both users, is it possible to set my DT permissions such that each user may only see their entries?

5 REPLIES 5

Hi Fabio,

Not Out-Of-The-Box but easily you can write a wrapper service over standard query table feature which forces a query condition with current user.

Carles.

Well you could make a wrapper service which checks permission for the data but you still have to give ServiceInvoke-permission for the datatable service to some of these methods GetDataTableEntries, GetDataTableEntryByKey, QueryDataTableEntries. And if you do that the user can query the datatable with rest client and see all the data from the datatable. So I don't know if there is a easy way to make this happen.

Hello,

In that case you could not grant any direct permission to the OOTB services of DataTable for users, just for System user. That would help, but needs additional user-check in the wrapper service.

Regards,

J.

Hi, Can you tell me a little bit more about this?

I have a datatable which has wrapper GetDataTableEntriesWithPermission-service which check for every line if user is allowed to view it. In the wrapper service I get all the lines with me.GetDataTableEntries(params); and loop those through and check the permission line by line.

Problem still is if I give permission to ServiceInvoke for the datatable service to System user and deny permissions for the logged in user except for the wrapper service and I try to call the Method it gives me "Not authorized for ServiceInvoke on GetDataTableEntries" So how can I execute GetDataTableEntries with system user priviledge inside a wrapperservice?

Edit: Actually I got this working. Logged in user had deny service invoke for the GetDataTableEntries. After I removed that it started to work. So System user has to have service invoke for the datatable and logged in user has to have service invoke for the wrapper service.

Hi asmolander​,

Sorry, I didn't notice your post before due to a workload. I'm glad you managed to make it working, that was my previous answer idea. If you have deny permission on GetDataTableEntries, then the System user wrapper permission is overwritten by this specific user denial of permissions.

Regards,

Jakub.

Announcements


Top Tags