Description
Build name: Jakarta
Build date: 08-15-2017_2030
Build tag: glide-jakarta-05-03-2017
Reported under: INT3379041
The customer is attempting to use functionality they used previously and are getting the following error from SearchMetadata:
source:Evaluator
com.glide.script.fencing.MethodNotAllowedException: Function getUser is not allowed in scope sn_global_searchui
Caused by error in sys_script_include.05b0c68867732200b133956c33415a9e.script at line 5
Steps to Reproduce
- Test using global search UI on the Jakarta branch
- Navigate to search group Knowledge & Catalog
- Select search table sc_cat_item
- Add new condition:
field = Created By
operation = contains
value = javascript: gs.getUser() - Perform global search for anything
The message Function getUser is not allowed in scope sn_global_searchui displayed either on the global search UI page or on the resulting page after a link in results is clicked.
Workaround
Instead of gs.getUser(), use gs.getUserID(), which returns the sys_id of the current user.
There may be other cases where filters that are allowed out-of-scope are not allowed in-scope. Converting those to use scope-safe methods is the appropriate resolution in those cases as well.
Related Problem: PRB1151412