5 Replies Latest reply on Mar 7, 2017 8:02 AM by jkaczynski-2 RSS
    fmanniti Creator

    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?

      • Re: Datatable permission on single entries
        carlesc Ninja

        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.

          • Re: Datatable permission on single entries
            asmolander Newbie

            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.

              • Re: Datatable permission on single entries
                jkaczynski-2 Creator

                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.

                  • Re: Datatable permission on single entries
                    asmolander Newbie

                    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.