ACL script - won't show logging
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-30-2017 11:56 PM
My ACL script starts with debugging text like this (first 3 lines trying to print to a log):
gs.print("AARON OBRIEN - PRINT - sys_user.read");
gs.log("AARON OBRIEN - LOG - sys_user.read");
gs.addInfoMessage("AARON OBRIEN - addInfoMessage - sys_user.read");
if (gs.getUserID() == current.sys_id || gs.getUser().hasRoles())
answer = true;
else
answer = false;
But it won't show. I just can't get an ACL script to show any debugging. I am at a bit of a loss the best way to write a script (best practices) in the sys_security_acl table.
It seems to be very hard to write a script and debug it. I am on Helsinki, so I don't believe the javascript has a debugger.
- Labels:
-
Best Practices
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2017 01:02 AM
A few things:
gs.print only prints in localhost_log so you would only see the message if you run in Background Scripts
gs.log will print in both localhost_log and syslog table - have you checked there and you can't find your log message?
Now, if you have your ACL on a specific table/field, why not enabling the Debug All Security and just load that table/field and see what the debug shows?