Add HasPermission Db query predicate.