GlideSPUserCriteria appears to be a way to use and check user criteria
for service portal records. This is dependent on the "Service Portal
User Criteria Support" plugin being activated, and the property,
"glide.service_portal.user_criteria_enabled".
isEnabled
Returns true or false based on the value of
glide.service_portal.user_criteria_enabled. If the propery is "true"
than it retuns true, else it returns false.
userCanSeeInstance
This expects a sys_id
of a sp_instance
record and then uses the user
critera records to determine visiblity.
userCanSeePage
This expects a sys_id
of a sp_page
record and then uses the user
critera records to determine visiblity.
userCanSeeSearchSource
This expects a sys_id
of a sp_search_source
record and then uses the
user critera records to determine visiblity.
This is the only function I could find in a OOB instance in the "Search
Page" widget server script near line 50.
var userCriteria = new GlideSPUserCriteria();
if (userCriteria.isEnabled()) {
if (!userCriteria.userCanSeeSearchSource(gr.getUniqueValue()))
return;
} else {
//...
}
userCanSeeWidget
This expects a sys_id
of a sp_widget
record and then uses the user
critera records to determine visiblity.