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

Fix permissions for licence summary #974

Merged
merged 2 commits into from
May 3, 2024
Merged

Conversation

Cruikshanks
Copy link
Member

@Cruikshanks Cruikshanks commented May 3, 2024

https://eaflood.atlassian.net/browse/WATER-4432
https://eaflood.atlassian.net/browse/WATER-4457

What tabs a user sees on the view licence page needs to be determined based on their permissions. Everyone should be able to see

  • Summary
  • Contact Details
  • Returns
  • Communications

Anyone in the National Permitting Service also needs to be able to see 'Charge Information'. The only team with access to 'Bills' is Billing & Data.

WATER-4432 got all that working but we overlooked something when we updated the 'tech' to allow us to load tabs in isolation ( WATER-4457 ). Each tab will now have its endpoint which means we also need to take into account the scope we assign to those routes.

Those tabs that all users should be able to see need to have no scope to make them work. But back when we initially started hacking our version of the page we just copied & pasted an existing route which had the 'billing' scope assigned. This means only a Billing & Data user can get to our licence page!

This change fixes the issue by removing the scope from the licence summary endpoint (the one endpoint we have built at this time!)

Note - this just removes the permission. It doesn't mean an unauthenticated user can now access the endpoint.

https://eaflood.atlassian.net/browse/WATER-4432
https://eaflood.atlassian.net/browse/WATER-4457

What tabs a user sees on the view licence page needs to be determined based on their permissions. Everyone should be able to see

- Summary
- Contact Details
- Returns
- Communications

Any one in the National Permitting Service also needs to be able to see 'Charge Information'. The only team with access to 'Bills' is Billing & Data.

WATER-4432 got all that working but we overlooked something when we update the 'tech' to allow us to load tabs in isolation ( WATER-4457 ). Each tab will now have its own endpoint which means we also need to take into account the `scope` we assign to those routes.

Those tabs that all users should be able to see need to have no `scope` to make them work. But back when we initially started hacking our version of the page we just copy & pasted an existing route which had the 'billing' scope assigned. This means only a Billing & Data user can get to our licence page!

This change fixes the issue by removing the scope from the licence summary endpoint (the one endpoint we have built at this time!)

> Note - this just removes the permission. It doesn't mean an unauthenticated user can now access the endpoint.
@Cruikshanks Cruikshanks added the bug Something isn't working label May 3, 2024
@Cruikshanks Cruikshanks self-assigned this May 3, 2024
@Cruikshanks Cruikshanks marked this pull request as ready for review May 3, 2024 12:46
@Cruikshanks Cruikshanks merged commit 75fc994 into main May 3, 2024
6 checks passed
@Cruikshanks Cruikshanks deleted the fix-view-licence-permissions branch May 3, 2024 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants