Saving Model.foreign_key permissions possible

The patch enables to set permission based on Model.foreign_key. So far only ACOs with an alias have been possible.