ErwinKomen / RU-passim

0 stars 0 forks source link

Check approval rights #730

Closed shariboodts closed 4 months ago

shariboodts commented 5 months ago

Before the final launch, do a final check of the editor approval system:

To be tested by Shari, Rafael, and Janis - any needed changes will be listed here.

  1. HUWA-imported authority files, even those that also have a PASSIM-project label, cannot be changed/edited by PASSIM editors. This should be changed, so that any item (manuscript/authority file/manifestation) can be edited by editors with rights on the project labels attached to these items (voorbeeld: passim.rich.ru.nl/ssg/details/1083/).
  2. PASSIM editors cannot now approve (turn green) authority files that also have. HUWA-label. This needs to be changed: editors of any project associated with an item should be able to change the status of that item, pending approval by editors of the other projects associated to that item.
  3. When merging data on manuscripts, one from HUWA import, one from PASSIM or other source, if we want to use the PASSIM-item and eliminate the HUWA-item, we need to be able to add the HUWA-id. So, action point: add a field 'HUWA-id' by default to all items when they are assigned the HUWA-project label. If it is easier, add a field 'HUWA-id' to all manuscript items, visible only when there is data in it.
ErwinKomen commented 4 months ago

Notes/implementation

  1. HUWA-imported authority files, even those that also have a PASSIM-project label, cannot be changed/edited by PASSIM editors. This should be changed, so that any item (manuscript/authority file/manifestation) can be edited by editors with rights on the project labels attached to these items (voorbeeld: passim.rich.ru.nl/ssg/details/1083/).
    1. Any AF that is connected with two projects can only be changed, when both project approvers agree
      1. Possible resolution (for you to do):
        1. have the moderator give someone from the team HUWA project approval rights
        2. make the changes in the HUWA project connected AFs as required
        3. have the moderator remove the person's HUWA project approval rights
      2. I made a little change, in order to make it easier:
        1. if anyone on the list of people that could approve a change has approval rights to all projects that are needed (e.g. both HUWA and Passim), then the approval of that person triggers complete approval and implementation of the change
        2. so for the passim.rich.ru.nl/ssg/details/1083/ example: user shariboodts could simply approve the pending change, and then it gets adopted without further ado
    2. Other items (manuscrip/manifestation) do not have this intricate project approval system. So the comment about that is moot, I think.
  2. PASSIM editors cannot now approve (turn green) authority files that also have. HUWA-label. This needs to be changed: editors of any project associated with an item should be able to change the status of that item, pending approval by editors of the other projects associated to that item.
    1. This has changed already with a previous issue
    2. I double-checked, and it really works now. If I have approval rights for just Passim, then I can change the status (traffic light) of an AF and save it, and it will be implemented
  3. When merging data on manuscripts, one from HUWA import, one from PASSIM or other source, if we want to use the PASSIM-item and eliminate the HUWA-item, we need to be able to add the HUWA-id.
    1. So, action point:
      1. Add a field 'HUWA-id' by default to all items when they are assigned the HUWA-project label.
      2. If it is easier, add a field 'HUWA-id' to all manuscript items, visible only when there is data in it.
    2. See implementation below
ErwinKomen commented 4 months ago

Editable HUWA id fields

  1. There already are internal tables that hold the connection between an internal Passim object (M, S) and an external object . The implementation depends on the particular model
  2. Authority File: this is EqualGold
    1. externaltype = huwop
    2. The HUWA id is already shown, if someone is a HUWA project approver
      1. Changed that into HUWA project editor
    3. Added externalid to the AF form, checked, works
  3. Manuscript: that is Manuscript
    1. externaltype = huwop
    2. The HUWA id is already shown, if someone is a HUWA project approver
      1. Changed that into HUWA project editor
    3. Added externalid to the ManuscriptForm, checked, works
  4. Sermon manifestation: that is SermonDescr
    1. This is more difficult, since there are two externaltypes: huwop and huwin
    2. Both fields are now editable.

Additional

I found that there were some situations where someone with editor rights (but no approver rights) was not able to edit.

  1. I added profile.editprojects.all(), which gives all the projects to which someon has edit rights (note that profile.projects.all() only gives those projects to which someone has approver rights)