Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Proper Role Permissions for Executing Queries via REST

Question
Craig Regester · Oct 16, 2017

Proper Role Permissions for Executing Queries via REST

Good afternoon - I am in the process of writing a AngularJS front-end for some CoS functions that my integration team uses for auditing, analyzing and various other purposes. I have re-tooled the functions to return JSON results that AngularJS can then interpret and display. Many kudos to the AngularJS series on this site for giving me a jump start.

One of these functions uses %SQL.Statement to prepare a class query on %Dictionary.CompiledClassQuery, Summary. This works perfectly if I give the web app making the call %All privileges but obviously I don't want to do that. I cannot determine the appropriate privilege(s) needed to execute this query otherwise however. My REST call simply returns ERROR 5540 - UserUnknownUserisnotprivilegedfortheoperation.

I have attempted to the give the Web App's unique Role EXECUTE privileges to %Dictionary.CompiledClassQuery_Summary and several other things without success.

Would someone please be able to point me in the right direction?

Thank you!

Craig Regester

#API #REST API #Caché

Source URL:https://community.intersystems.com/post/proper-role-permissions-executing-queries-rest