ErwinKomen / RU-passim

0 stars 0 forks source link

Create dataset via MyPASSIM: correction #759

Closed shariboodts closed 2 months ago

shariboodts commented 2 months ago
  1. When following the steps to create a new dataset from MyPASSIM, we have noticed a problem:

The screen with the Private Dataset Details cannot be edited, which means the user cannot add a name to the dataset. We believe that this absence of a name causes problems in filling and viewing the dataset. When using the functionality 'Add to a dataset' in the Basket drop-down menu, a list of available datasets is given, but only those that have a name, the newly created, unnamed dataset is not one of the options. Also, when viewing the list of datasets from MyPASSIM, those that do not have a name are not clickable.

How to fix this:

  1. Additionally, it seems now not to be possible to delete a dataset from the MyPASSIM dataset list view.

How to fix this: there is already a possibility to select datasets, add the option to delete the selected datasets.

ErwinKomen commented 2 months ago

Investigation

For the established passim_editor all works fine. It is for the passim_user who is not an editor, that the 'problem' occurs.

Name problem

If a user is signed in, he/she is able to create a dataset, and it gets assigned a default name (e.g. erwintest_1056_manu). I checked online: there are datasets that have None in the name field. How does that work?

  1. MyPassim
  2. List "my datasets" (button)
  3. Add a dataset from there

Solution to the 'unnamed' problem:

  1. Extended after_save() method from class CollAnyEdit: this makes sure any dataset gets a name - done
  2. Updated unnamed ones via adapt - done

What about non-users, i.e. people not signed in? -- Those are not able to enter that part of the db

Assigning restricted editor rights to non-editors

  1. Extended add_to_context() method of CollPrivAny: if a private dataset is opened by the owner of that dataset, then that user gets editing rights
    1. Prevent this user to change the scope of the dataset: filtered out the scope field_key in the code above
ErwinKomen commented 2 months ago

Additionally: deleting dataset(s)

  1. The dataset listview is a general listview, like all other listviews.
    1. None of the listviews has an option to mass-delete all selected items.
    2. The Author listview has the possibility to delete one particular item
    3. It is possible to add functionality to the selectbuttons for specific listviews...
      1. Okay, added such a button for this particular situation
      2. Made sure and tested that a user can only delete his/her own stuff