1. 24 May, 2021 1 commit
    • Jérome Perrin's avatar
      ingestion: review publication_state argument · 296b97bf
      Jérome Perrin authored
      Changing state directly in Base_contribute was only functional for the case
      where metadata was discovered asynchronously. In the case of synchronous
      discovery, the state was first changed state, and Document_convertToBaseFormatAndDiscoverMetadata
      was executed - but this this was causing Unauthorized like this:
      
            Module script, line 10, in Document_convertToBaseFormatAndDiscoverMetadata
            - <PythonScript at /erp5/Document_convertToBaseFormatAndDiscoverMetadata used for /erp5/document_module/163>
            - Line 10
              return context.discoverMetadata(filename=filename,
          Unauthorized: You are not allowed to access 'discoverMetadata' in this context
      
      because once we have already changed state, regular user no longer have
      permission to access discoverMetadata, because that method needs ModifyPortalContent
      permission.
      
      Instead, of handling publication_state only in Base_contribute, treat it
      like others user input parameter and change state during discovery.
      
      Tests were also re-organised to move Base_contribute related test in testIngestion
      and also to run Base_contribute tests as a non-manager user.
      296b97bf
  2. 21 May, 2021 2 commits
  3. 20 May, 2021 1 commit
  4. 19 May, 2021 2 commits
  5. 18 May, 2021 3 commits
  6. 17 May, 2021 3 commits
  7. 12 May, 2021 4 commits
  8. 11 May, 2021 9 commits
  9. 10 May, 2021 2 commits
  10. 07 May, 2021 4 commits
  11. 06 May, 2021 4 commits
  12. 03 May, 2021 1 commit
  13. 30 Apr, 2021 4 commits