- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 08:56 AM
Hello
I have a UI Macro that contains a script that is supposed to look for entries in a certain table and display them in table format in the Service Catalog. The users that would be using this macro have a particular role.
At the same time, the security on the target table is quite strict. To try to get around this, I had created read ACLs for table, and table.* for the same role.
However, no matter what I do in the macro, it doesn't seem to want to search for any records. Wondering if I should be using a different type of ACL, is there a Query ACL that I can use?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 02:29 PM
As it turns out Macros do work well with ACLs
What DOESN'T Work well is if you use a variable that was previously unknown to be a reserved keyword. As I found out, UI Macros interpret the "gr" variable as a global variable unlike business rules that assume that gr is local to the rule itself.
Once I changed the gr to something more distinctive (i.e. grec), the script worked as expected.
*bangs head*
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 10:25 AM
Yes, I attempted this through impersonation. No dice when I run the Macro.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 10:47 AM
Interesting that the table already has table and table.* ACLs without any particular roles in question, nor any conditions. The description says this was done to give all users read only access to this table. And Yet, running a query through a macro doesn't return anything.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 02:29 PM
As it turns out Macros do work well with ACLs
What DOESN'T Work well is if you use a variable that was previously unknown to be a reserved keyword. As I found out, UI Macros interpret the "gr" variable as a global variable unlike business rules that assume that gr is local to the rule itself.
Once I changed the gr to something more distinctive (i.e. grec), the script worked as expected.
*bangs head*

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2016 03:22 PM
That makes sense. That's why today's business rules now default to encapsulated within a function to avoid variable scoping issues. Glad you got it figured out.