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

Issue Regarding System User

vpanwar
1-Visitor

Issue Regarding System User

Hi ,

I have an issue regarding System Users,here is the scenario:

1) I created a data table named 'A'.

2) I created a thing template 'SystemUserTemplate' with generic template.

3) I created a thing 'SystemUserThing' which inherits 'SystemUserTemplate' and created a service named 'wrapperService ' which internally calls getDataTableCount() on Table 'A' and returns it's output as a result.

4) I have created a user 'SystemUserTester' which belongs to 'Everyone' organisation so it has visibility to all the entities I've created in earlier steps.

5) I have provided the template with run time instance permissions for service execute,property read,property write for the user 'SystemUserTester', and overroded the service execute permission for the service 'wrapperService' for 'System' user.

Note(I haven't provided runtime permissions for the data table 'A' for 'SystemUserTester' intentionally to test TW super user )

6) I created a mashup with a button which executes  'wrapperService' from the thing 'SystemUserThing' and mapped it's output to a label. However when i logged in using the user 'SystemUserTester' i got error message as

: ERROR - Error in invoking service Things_SystemUserThing, wrapperService, Things, SystemUserThing, Services, wrapperService. Error from the server: "Wrapped com.thingworx.common.exceptions.InvalidRequestException: Not authorized for ServiceInvoke on GetDataTableEntryCount in A Cause: Not authorized for ServiceInvoke on GetDataTableEntryCount in A"

ACCEPTED SOLUTION

Accepted Solutions
liliu
12-Amethyst
(To:vpanwar)

Hi Vinay,

Here is the definication about System user from ThingWorx Help Center

Regarding to this explanation , the system user muse be pemitted to exectue the service (for your case, it's getDataTableCount()).

It also point out that carefully use system user, and do not use it as a general workaround.

BR,

Lily

View solution in original post

4 REPLIES 4
liliu
12-Amethyst
(To:vpanwar)

Hi Vinay,

Please also grant the user, named 'System', run time permission on data table 'A'.

Best Regards,

Lily

vpanwar
1-Visitor
(To:liliu)

Hi  Li Liu,

'System' user is a Thingworx system object,we don't require any permissions for the system object.

That's why I was trying out this system user that should internally manage permissions and invoke the wrapped inner service,however it didn't worked.

vinay

liliu
12-Amethyst
(To:vpanwar)

Hi Vinay,

Here is the definication about System user from ThingWorx Help Center

Regarding to this explanation , the system user muse be pemitted to exectue the service (for your case, it's getDataTableCount()).

It also point out that carefully use system user, and do not use it as a general workaround.

BR,

Lily

vpanwar
1-Visitor
(To:liliu)

Hi Li Li Liu

Thanks for the help, it worked

Best Regards

Vinay

Announcements


Top Tags