diff --git a/ckanext/harvest/harvesters/base.py b/ckanext/harvest/harvesters/base.py index 6f5e08ef5..4051c4c77 100644 --- a/ckanext/harvest/harvesters/base.py +++ b/ckanext/harvest/harvesters/base.py @@ -170,15 +170,17 @@ def _get_user_name(self): if self._user_name: return self._user_name - config_user_name = config.get('ckanext.harvest.user_name') - if config_user_name: - self._user_name = config_user_name - return self._user_name - context = {'model': model, 'ignore_auth': True, } + config_user_name = self.config.get('user') + if config_user_name: + user = p.toolkit.get_action('user_show')(context, + {'id': config_user_name}) + self._user_name = user['name'] + return self._user_name + # Check if 'harvest' user exists and if is a sysadmin try: user_harvest = p.toolkit.get_action('user_show')(