LPS-35650 Unable to assign permissions by scope different than portal using sharding

It should be forbidden to run SQL queries joining by the ResourceAction entity since it only contains data in the shard by default running the portal in a sharding environment.