LPS-43611 Extract role and owner perm checking - no logic changes
LPS-43611 Initial refactor - small performance improvements
LPS-43611 Move roles and owner filtering to the inner query
LPS-43611 SF
LPS-43611 This is faster