Disjunction results in plural boolean

(imported topic written by MrFixit)

I was trying to stuff a disjunction into a if-then as part of a analysis and it complains that I need a singular expression.

Is there around this or do I just abandon using the disjunction?

q: If (disjunction of (effective write permission for “Everyone” of it ; effective read permission for “Everyone” of it ; effective execute permission for “Everyone” of it )) of dacls of security descriptors of Folder “D:\Database\Extract” then “OK” Else “Fail”

E: A singular expression is required.

(imported comment written by NoahSalzman)

MrFixit,

You need to wrap the whole true/false part in parentheses, add ‘as string = “True”’ at the end. I haven’t checked this syntax but it would look like this:

q: If ((disjunction of (effective write permission for “Everyone” of it ; effective read permission for “Everyone” of it ; effective execute permission for “Everyone” of it )) of dacls of security descriptors of Folder “D:\Database\Extract”) as string = “True” then “OK” Else “Fail”

That wrapping makes the if/then/else logic happy as it only has to deal with a single expression.

Noah

(imported comment written by jessewk)

You don’t need the ‘as string’ cast and comparison to “True”. I found I was getting a singular expression error because the folder I was inspecting didn’t have values for the effective permissions properites. I made the lookups plural and the errors went away (my favorite relevance trick). This works for me:

if disjunction of (effective write permissions for “Everyone” of it ; effective read permissions for “Everyone” of it ; effective execute permissions for “Everyone” of it ) of dacls of security descriptors of folders “C:” then “OK” Else “Fail”

(imported comment written by BenKus)

Warning! We have found the “effective permissions” inspectors can possibly trigger an AD query, which in some cases can drive high load in AD… Consider not using this inspector, but if you do, please set the “Evaluation Interval” high (like 1 day)… and check with the AD team to see if they see high load…

Ben