Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NRPT-653 Add ENV-COS role and fix flavourId bug #804

Merged
merged 1 commit into from
Mar 16, 2021

Conversation

BcGovNeal
Copy link
Contributor

https://bcmines.atlassian.net/browse/NRPT-653

This PR adds the ENV-COS role to API and frontend. It also includes the following:

  • Migration and code fixes to change Conservation Officer Service to Conservation Officer Service (COS)
  • Migration to add ENV-COS role to COORS import records
  • Fixed bug in record type Put controllers where new flavour Ids are not appended to the existing array, but instead overwrites it.

Create admin:env-cos record:

POST http://localhost:3000/api/record
{
    "orders": [
        {
            "recordName": "ENV-COS Role Test",
            "recordSubtype": "None",
            "issuingAgency": "Conservation Officer Service (COS)",
            "author": "BC Government",
            "issuedTo": {
                "type": "Individual",
                "companyName": null,
                "firstName": "Test",
                "middleName": "Middle",
                "lastName": "Name",
                "fullName": null,
                "dateOfBirth": null
            },
            "OrderNRCED": {
                "summary": "NRCED Summary",
                "addRole": "public"
            },
            "OrderLNG": {
                "description": "LNG Summary",
                "addRole": "public"
            }
        }
    ]
}

Verify success and record read/write issuedTo read/write have admin:env-cos role

Create a document in the record:

POST http://localhost:3000/api/record/{record_id}/document
form-data
fileName: test-file-name.pdf
upfile: browse to your file

Verify success document record has admin:env-cos role

To verify redaction, you can create a record in NRPTI from another user role and set the individual age to under 19. Then do a search using:

GET http://localhost:3000/api/search?dataset=Order,Inspection,Certificate,Permit,SelfReport,Agreement,RestorativeJustice,Ticket,AdministrativePenalty,AdministrativeSanction,Warning,ConstructionPlan,ManagementPlan,CourtConviction,AnnualReport,CertificateAmendment,Correspondence,DamSafetyInspection,Report&pageNum=0&pageSize=25&sortBy=-dateAdded&fields=

@BcGovNeal BcGovNeal closed this Mar 15, 2021
@BcGovNeal BcGovNeal reopened this Mar 15, 2021
@sonarcloud
Copy link

sonarcloud bot commented Mar 15, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@BcGovNeal BcGovNeal requested review from marklise, mtCarto and MaxWardle and removed request for marklise March 16, 2021 15:31
Copy link
Contributor

@marklise marklise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@BcGovNeal BcGovNeal merged commit f4ffbce into bcgov:master Mar 16, 2021
@BcGovNeal BcGovNeal deleted the NRPT-653 branch May 5, 2021 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants