From fda70042389b113e8976f461e8451ffce3913c09 Mon Sep 17 00:00:00 2001 From: Alan Orth Date: Thu, 25 Apr 2019 23:06:39 +0300 Subject: [PATCH] Update notes for 2019-04-25 --- content/posts/2019-04.md | 36 ++++++++++++++++++++++++++ docs/2019-04/index.html | 56 +++++++++++++++++++++++++++++++++++++--- docs/sitemap.xml | 10 +++---- 3 files changed, 94 insertions(+), 8 deletions(-) diff --git a/content/posts/2019-04.md b/content/posts/2019-04.md index 59783a852..d0df35e8e 100644 --- a/content/posts/2019-04.md +++ b/content/posts/2019-04.md @@ -948,4 +948,40 @@ dspace=# SELECT COUNT(text_value) FROM metadatavalue WHERE resource_type_id=2 AN - I sent a message to the dspace-tech mailing list to ask for help +## 2019-04-25 + +- Peter pointed out that we need to remove Delicious and Google+ from our social sharing links + - Also, it would be nice if we could include the item title in the shared link + - I created an issue on GitHub to track this ([#419](https://github.com/ilri/DSpace/issues/419)) +- I tested the REST API after logging in with my super admin account and I was able to get results for the problematic query: + +``` +$ curl -f -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/login" -d '{"email":"example@me.com","password":"fuuuuu"}' +$ curl -f -H "Content-Type: application/json" -H "rest-dspace-token: b43d41a6-5ac1-455d-b49a-616b8debc25b" -X GET "https://dspacetest.cgiar.org/rest/status" +$ curl -f -H "rest-dspace-token: b43d41a6-5ac1-455d-b49a-616b8debc25b" -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.cpwf", "value":"WATER MANAGEMENT","language": "en_US"}' +``` + +- I created a normal user for Carlos to try as an unprivileged user: + +``` +$ dspace user --add --givenname Carlos --surname Tejo --email blah@blah.com --password 'ddmmdd' +``` + +- But still I get the HTTP 401 and I have no idea which item is causing it +- I enabled more verbose logging in `ItemsResource.java` and now I can at least see the item ID that causes the failure... + - The item is not even in the archive, but somehow it is discoverable + +``` +dspace=# SELECT * FROM item WHERE item_id=74648; + item_id | submitter_id | in_archive | withdrawn | last_modified | owning_collection | discoverable +---------+--------------+------------+-----------+----------------------------+-------------------+-------------- + 74648 | 113 | f | f | 2016-03-30 09:00:52.131+00 | | t +(1 row) +``` + +- Meet with CodeObia to see progress on AReS version 2 +- Marissa Van Epp asked me to add a few new metadata values to their Phase II Project Tags field (cg.identifier.ccafsprojectpii) + - I created a [pull request](https://github.com/ilri/DSpace/pull/420) for it and will do it the next time I run updates on CGSpace +- Communicate with Carlos Tejo from the Land Portal about the `/items/find-by-metadata-value` endpoint + diff --git a/docs/2019-04/index.html b/docs/2019-04/index.html index 26565c772..57d3395a7 100644 --- a/docs/2019-04/index.html +++ b/docs/2019-04/index.html @@ -38,7 +38,7 @@ $ ./delete-metadata-values.py -i /tmp/2019-02-21-delete-1-region.csv -db dspace - + @@ -81,9 +81,9 @@ $ ./delete-metadata-values.py -i /tmp/2019-02-21-delete-1-region.csv -db dspace "@type": "BlogPosting", "headline": "April, 2019", "url": "https:\/\/alanorth.github.io\/cgspace-notes\/2019-04\/", - "wordCount": "6018", + "wordCount": "6298", "datePublished": "2019-04-01T09:00:43\x2b03:00", - "dateModified": "2019-04-24T17:15:13\x2b03:00", + "dateModified": "2019-04-24T18:49:55\x2b03:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -1328,6 +1328,56 @@ dspace=# SELECT COUNT(text_value) FROM metadatavalue WHERE resource_type_id=2 AN
  • I sent a message to the dspace-tech mailing list to ask for help
  • +

    2019-04-25

    + + + +
    $ curl -f -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/login" -d '{"email":"example@me.com","password":"fuuuuu"}'
    +$ curl -f -H "Content-Type: application/json" -H "rest-dspace-token: b43d41a6-5ac1-455d-b49a-616b8debc25b" -X GET "https://dspacetest.cgiar.org/rest/status"
    +$ curl -f -H "rest-dspace-token: b43d41a6-5ac1-455d-b49a-616b8debc25b" -H "Content-Type: application/json" -X POST "https://dspacetest.cgiar.org/rest/items/find-by-metadata-field" -d '{"key":"cg.subject.cpwf", "value":"WATER MANAGEMENT","language": "en_US"}'
    +
    + + + +
    $ dspace user --add --givenname Carlos --surname Tejo --email blah@blah.com --password 'ddmmdd'
    +
    + + + +
    dspace=# SELECT * FROM item WHERE item_id=74648;
    + item_id | submitter_id | in_archive | withdrawn |       last_modified        | owning_collection | discoverable
    +---------+--------------+------------+-----------+----------------------------+-------------------+--------------
    +   74648 |          113 | f          | f         | 2016-03-30 09:00:52.131+00 |                   | t
    +(1 row)
    +
    + + + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 3adc8d085..7d9e5f6e6 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,30 +4,30 @@ https://alanorth.github.io/cgspace-notes/2019-04/ - 2019-04-24T17:15:13+03:00 + 2019-04-24T18:49:55+03:00 https://alanorth.github.io/cgspace-notes/ - 2019-04-24T17:15:13+03:00 + 2019-04-24T18:49:55+03:00 0 https://alanorth.github.io/cgspace-notes/tags/notes/ - 2019-04-24T17:15:13+03:00 + 2019-04-24T18:49:55+03:00 0 https://alanorth.github.io/cgspace-notes/posts/ - 2019-04-24T17:15:13+03:00 + 2019-04-24T18:49:55+03:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2019-04-24T17:15:13+03:00 + 2019-04-24T18:49:55+03:00 0