bcgov / NRPTI

Natural Resources Public Transparency Initiative
Apache License 2.0
5 stars 15 forks source link

NRIS-EPD records not getting ENV-EPD read/write privilegs #1146

Closed RFK250 closed 6 months ago

RFK250 commented 10 months ago

Describe the Bug admin:ENV-EPD users should still have read/write privileges for records for records from the NRIS-EPD source system.

Issues in the source system should be addressed in the source system but an NRIS-EPD user should be able to unpublish a record until a time in which it has been corrected in the source system.

Expected Behaviour As an admin:ENV-EPD user, I should be able to unpublish records with source system = NRIS-EPD and Schema Name = InspectionNRCED

Actual Behaviour An admin:ENV-EPD is not able to unpublish an NRIS record

Implications Until this is addressed, we have to give those users elevated user privileges (e.g. admin:nrced or admin:sysadmin) in order to allow them tounpublish the records they need to. That is problematic as it allows them to see personal information in records from other ministries, which they don't need to see in order to do their work.

Steps To Reproduce Steps to reproduce the behaviour:

  1. As a user with only admin:env-epd and public privileges, go here.
  2. select "unpublish From NRCED" in the bottom right

Notes

davidclaveau commented 6 months ago

Made a migration to add the admin:env-epd role to all existing nris-epd inspection records for the master and NRCED records, then made a change to the nris-epd importer to add the role to all incoming inspections for their master and NRCED records. Added testing to make sure that this role code is applied to the importer as well.