I've a use case where Users having a PermissionSetAssignment X should not be allowed to be made owner of a custom object record by another users. I'm able to do this using a trigger but I've to make it work using configuration. How can I achieve this using validation rule or any other config concept (The Lookup field is based on User and Group and lookup filters can't be used here).
Validation rules can reference custom permissions and custom permissions can be assigned to permission sets
so, a rule could look like
Owner_Change_Restricted is a custom permission assigned to a permission set possessed by some users
Personally, I prefer to make my permissions named something positive, so the validation rule would be:
and custom permission
Owner_Change_Enabled assigned to permission sets for users that can change ownership.