Fix problem on accessing private entities
requested to merge hackathon-permission-integration-tk-fix-private-entity-checks into hackathon-permission-integration-tk
The code so far relied on having the same contact & user id. However, often this is not the case. So this MR extracts the real created by user id & compares it with the id of the current user.