Have changed security to work with domain objects of certain type,
instead of specific instances.
Changed security