Skip to content

Commit

Permalink
[ckan#59] Ignore auth when using site_user
Browse files Browse the repository at this point in the history
  • Loading branch information
amercader committed Aug 14, 2013
1 parent 64c2d14 commit 1c36b33
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 6 additions & 1 deletion ckanext/harvest/commands/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,12 @@ def create_harvest_source(self):
'config': config,
}

context = {'model':model, 'session':model.Session, 'user': self.admin_user['name']}
context = {
'model':model,
'session':model.Session,
'user': self.admin_user['name'],
'ignore_auth': True,
}
source = get_action('harvest_source_create')(context,data_dict)
print 'Created new harvest source:'
self.print_harvest_source(source)
Expand Down
4 changes: 2 additions & 2 deletions ckanext/harvest/tests/test_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def import_stage(self, harvest_object):

package_dict = logic.get_action(logic_function)(
{'model': model, 'session': model.Session,
'user': user, 'api_version': 3},
'user': user, 'api_version': 3, 'ignore_auth': True},
json.loads(harvest_object.content)
)

Expand Down Expand Up @@ -103,7 +103,7 @@ def test_01_basic_harvester(self):
)['name']

context = {'model': model, 'session': model.Session,
'user': user, 'api_version': 3}
'user': user, 'api_version': 3, 'ignore_auth': True}

source_dict = {
'title': 'Test Source',
Expand Down

0 comments on commit 1c36b33

Please sign in to comment.