Added loop_permissions for external sources