Skip to content

PSP-10994 Restrict Contractor lease access to lease team/project team#5184

Merged
asanchezr merged 9 commits intobcgov:devfrom
asanchezr:psp-10994-contractor-lease-access
Feb 3, 2026
Merged

PSP-10994 Restrict Contractor lease access to lease team/project team#5184
asanchezr merged 9 commits intobcgov:devfrom
asanchezr:psp-10994-contractor-lease-access

Conversation

@asanchezr
Copy link
Collaborator

Create lease restriction

lease-create-contractor-missing-error

Update lease restriction

lease-update-contractor-missing-error

@asanchezr asanchezr self-assigned this Feb 2, 2026
@asanchezr asanchezr added enhancement New feature or request 5.16 labels Feb 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5184

1 similar comment
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5184

@asanchezr asanchezr force-pushed the psp-10994-contractor-lease-access branch from c0371bc to 013d7e4 Compare February 2, 2026 19:12
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 2, 2026

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2026

See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5184

@devinleighsmith
Copy link
Collaborator

@asanchezr please address codeQl warnings if relevant.

Also, seeing some behaviour on lease creation that may not be consistent with acquisition.

  1. Make current user a contractor, remove northern region.
  2. Click on new property from northern region.
  3. Create a lease from that property. Enter all required fields but do not enter region. Save
  4. Backend throws "User is not assigned to the Lease File's region". Debugging shows that northern region sent to backend even though region field in UI appears blank.

@asanchezr
Copy link
Collaborator Author

@asanchezr please address codeQl warnings if relevant.

Also, seeing some behaviour on lease creation that may not be consistent with acquisition.

  1. Make current user a contractor, remove northern region.
  2. Click on new property from northern region.
  3. Create a lease from that property. Enter all required fields but do not enter region. Save
  4. Backend throws "User is not assigned to the Lease File's region". Debugging shows that northern region sent to backend even though region field in UI appears blank.

@devinleighsmith - The codeql warnings seem weird but will take a look (most are on test files)

The behaviour you see with property region assigned to file region I can see it already existing in DEV (so not related to this changes). Both Leases and Acquisition will send the northern region on the file submission if the first property added is in northern region - regardless of whether user is contractor/staff and regardless of user region access. This seems like an existing bug. If you agree I will ask Praveen to validate and create a bug ticket and we can fix that separate from this PR. Sounds good?

This is the error I get as a staff (not contractor) creating an acquisition file when I don't have access to northern region
image

@asanchezr asanchezr added this pull request to the merge queue Feb 3, 2026
Merged via the queue into bcgov:dev with commit 7772647 Feb 3, 2026
22 checks passed
@asanchezr asanchezr deleted the psp-10994-contractor-lease-access branch February 26, 2026 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.16 enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants