Commit Graph

33 Commits

Author SHA1 Message Date
amercader c76b7d95f3 Only count public datasets on the source status
This is more in line with what is done on the orgs/groups pages
2013-03-18 16:41:01 +00:00
amercader 2ee27164c3 [#13] Remove or deprecate unused code
Mostly in controllers, dictization and plugin, either related to the old
templates pre-dataset type or old authorization.
2013-03-06 16:54:33 +00:00
amercader 04710fd1c6 Revert removal of filter in job list action in 7544d5c 2013-03-06 12:19:20 +00:00
John Martin 7544d5c5ef [#7] Removed faceted navigation for uneeded toggles in job reports 2013-03-05 15:23:42 +00:00
amercader 5b0b6a4b8b Fix bug in harvest job reports 2013-02-28 15:47:48 +00:00
amercader f7cba69fe6 Merge branch '2.0-dataset-sources' into 7-harvest-source-templates 2013-02-28 12:17:47 +00:00
amercader a86d91c3f0 [#11] Make get actions side_effect_free 2013-02-28 12:17:15 +00:00
amercader efe977512b Include gather errors on job summaries and reports 2013-02-25 17:17:08 +00:00
amercader 57b3739dd4 [#7] Return most recent job on source status, not just finished 2013-02-25 15:32:39 +00:00
amercader eaa8988440 [#4] Changes in schema to accommodate organizations
Basically handle the 'owner_org' field in form_to_db and db_to_form.
Added 'owner_org', 'frequency' (has default) and 'config' to surplus
keys in check_data_dict.
Also remove schema tweaks to let package_show call the appropiate schema
function.
2013-02-11 16:34:52 +00:00
amercader e1ce0b7267 [#5] Allow not returning error summary on job dictize 2013-02-04 18:28:45 +00:00
amercader 8576ad6784 [#5] Add job listing page 2013-02-04 18:20:58 +00:00
amercader 676c7d34b6 [#5] Add method for returning the original URL for a document
Harvesters implementing IHarvester can define a `get_original_url`
method that should return a URL pointing to the original location of a
document in the remote server. If present, this URL will be used on the
job reports.

Examples:
* For a CKAN record: http://{ckan-instance}/api/rest/{guid}
* For a WAF record: http://{waf-root}/{file-name}
* For a CSW record: http://{csw-server}/?Request=GetElementById&Id={guid}&...
2013-01-24 18:35:43 +00:00
amercader 30d58b2b7b [#5] Preliminary job report logic function and page (WIP) 2013-01-23 18:04:19 +00:00
amercader 9ba6e8f3b3 [#5] Add error summary to harvest_job_dictize
It will return the counts for the 20 most common errors for that
particular job. These will available when calling harvest_job_show.

Also refactor the harvest source status object to just call
harvest_job_dictize on the 'last_job' key, as it has all the
interesting fields anyway.
2013-01-22 13:13:24 +00:00
amercader 30c9eedf5f Improve harvest source status creation
Use report_status field to improve speed, remove unnecessary fields.
2013-01-17 15:43:45 +00:00
kindly 7b6beb1470 fix wrong authorization logic 2012-12-24 22:34:37 +00:00
amercader 43950aa4ff Merge branch 'release-v2.0' into 4-new-auth-for-2.0
Conflicts:
	ckanext/harvest/logic/action/get.py
	ckanext/harvest/tests/test_queue.py
2012-12-20 16:38:57 +00:00
amercader 19cd80b264 [#4] Fixes on the auth layer against the new core auth
Thanks @locusf for the original patch
2012-12-20 16:09:26 +00:00
kindly 596b9bb475 fix auth to use new sysadmin flag 2012-12-17 23:46:43 +00:00
amercader 81c3881a1a Add active field to source dict 2012-12-13 18:00:07 +00:00
amercader 8e1621731b Move harvest source status function as a logic function
The status dict is added automatically to harvest source packages.
Note that the actual queries still need to be updated as they proabably
won't scale.
2012-12-12 11:45:13 +00:00
amercader b0407bb2ac Update harvest_source_show logic function 2012-12-11 12:49:05 +00:00
kindly 6db65b5826 made manual default not null 2012-11-05 13:17:32 +00:00
amercader fdf01c09f2 Fix wrong check for harvest sources 2012-11-01 14:12:45 +00:00
kindly 2529a17304 add jobs at certain frequencies 2012-10-29 17:15:02 +00:00
David Read a5fac2ac86 Added logic for getting a harvest source when viewing a dataset. 2012-06-01 17:03:40 +01:00
David Read 5151f4ee23 In publisher auth mode, any member of the group can make the changes. This brings things in line with the general idea that Admins have the power to do this plus authorize other editors/admins. 2012-05-29 15:21:34 +01:00
amercader f0e2521d9b [logic,auth] Modify checks to ensure users are admins of their publishers 2012-03-06 10:16:27 +00:00
amercader 2a2397c0ed [logic,auth] Implement publisher auth profile
The publisher profile allows general users to handle harvest sources
based on membership to a certain group (publisher), as opposed to the
default auth profile where only sysadmins can perform any harvesting
task.
To enable it, put this directive in your ini file:

    ckan.harvest.auth.profile = publisher

TODO:
 * Save publisher id / user id when creating sources
 * Show publisher in form and index page
2012-03-02 16:49:39 +00:00
amercader a35eb75440 [logic,auth] Add auth logic layer
The first version of the auth layer is based on the current policy, i.e.
you need to be sysadmin to perform any action.

TODO: the CLI is still not working.
2012-03-01 12:02:16 +00:00
amercader c798013752 [logic] Refactor the rest of the logic functions (create,update,delete) 2012-02-29 15:20:35 +00:00
amercader 651474e9f1 [logic] Refactor logic layer to follow CKAN core conventions
To make maintenance easier and better support the upcoming auth checks,
the logic layer has been refactored to mimic the structure of the one on
CKAN core: separate actions and dictize functions and logic functions
receive a context.
Only get functions are included in this commit.
2012-02-29 10:59:02 +00:00