Fix for permissions to edit a record

Current IF-statement doesn't check correctly on permissions, for example if 'zone_content_edit_own' is checked in the permission template, the user using this template will still not be able to edit records for the domains he owns