User Criteria and canRead

Mathias Johans1
Mega Expert

Hi!

I am wondering if the "canRead()" function considers User Criteria when run on a record?

eg; I am looping through knowledge articles to populate a widget and the knowledge articles have "can_read_user_criteria" set on each article. When running "article.canRead()" on each article, is both ACL's and current user criteria evaluated?

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Hi there,

In short: No.

canRead() is just about the Access Controls. Not about the User Criteria. canRead() is only about Glide Record:
https://developer.servicenow.com/app.do#!/api_doc?v=madrid&id=r_GlideRecord-CanRead

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

3 REPLIES 3

Mark Roethof
Tera Patron
Tera Patron

Hi there,

In short: No.

canRead() is just about the Access Controls. Not about the User Criteria. canRead() is only about Glide Record:
https://developer.servicenow.com/app.do#!/api_doc?v=madrid&id=r_GlideRecord-CanRead

If my answer helped you in any way, please then mark it as helpful.

Kind regards,
Mark

---

LinkedIn

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

SaiRaviKiran Ak
Giga Guru

User criteria refers to knowledge base records that determine the users who can read or contribute to a knowledge base. User criteria definitions:

canRead  - users who can read all knowledge base articles

Mathias Johans1
Mega Expert

Is it safe to assume that "$sp.canReadRecord" will check User Criteria?