The CreatorCon Call for Content is officially open! Get started here.

Are Business rules run as the logged in user?

richardn
Kilo Contributor

Is server side scripting run as the logged in user?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Yes it is. You can prove this by doing a debug statement like



gs.info(gs.getUserID()); // display this user's user ID.



Why do you ask?


View solution in original post

5 REPLIES 5

Dylan Mann1
Giga Guru

Can you give more context? Is there a specific business rule you're curious about? There are Glide Session methods like gs.getUser() which return the logged in user.


Chuck Tomasi
Tera Patron

Yes it is. You can prove this by doing a debug statement like



gs.info(gs.getUserID()); // display this user's user ID.



Why do you ask?


We were having a discussion as to why BR doesn't adhere to ACLs when they update a record etc..


That's where I thought you were going. If the script uses a GlideRecord() operation, then the system account is used and effectively, ACLs are ignored. The best practice is to use GlideRecordSecure() as a default to enforce security and use GlideRecord() as an exception.