openresearchdata / ckanext-oaipmh

OAI-PMH harvester for CKAN
Other
4 stars 13 forks source link

Auth #4

Closed bellisk closed 9 years ago

metaodi commented 9 years ago

I think it would be better to use the config of a single harvester source instead of having username/password in the global config. Because then you could add multiple OAIPMH-Harvesters on one instance and each could have a different username/password.

When you add a harvester source, there is a section called "Configuration", there you can add a JSON which you then can parse (see ckanext-harvest).

WDYT?

bellisk commented 9 years ago

That would definitely be better.

bellisk commented 9 years ago

Just looked at this and remembered why I didn't do this the first time. You can't add arbitrary key-value pairs into the harvester config, only the ones already specified (see here). I guess you could add this but it would be a little bit more work.

metaodi commented 9 years ago

This looks very good. One little thing: I would remove the from pylons import config line on the top to not confuse the two configurations, as far as I can tell it is not used anywhere. If it is needed, then I would rename the import to something like pylons_config.

bellisk commented 9 years ago

I actually already made a similar update and it just didn't push. Have a look now. :)