-
Notifications
You must be signed in to change notification settings - Fork 3
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
LCFS-1654: Protect routes for compliance report #1686
LCFS-1654: Protect routes for compliance report #1686
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although your solution is workable, this adds an extra api call every time we open one of these views. A more efficient solution would be to use the existing validation files on the backend and check user permissions there. validation.py already uses compliance record so we have status available. Let me know what you think.
d833eae
to
f07e545
Compare
f07e545
to
30717de
Compare
30717de
to
d793d7c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thank you for moving to a backend solution. 👍
If the user has Government role and the compliance report status is "Draft" restrict access to the compliance report and its schedules to ensure they remain protected. The user is returned to /compliance-reporting
/compliance-reporting/:compliancePeriod/:complianceReportId/
/compliance-reporting/:compliancePeriod/:complianceReportId/supply-of-fuel
/compliance-reporting/:compliancePeriod/:complianceReportId/final-supply-equipments
/compliance-reporting/:compliancePeriod/:complianceReportId/allocation-agreements
/compliance-reporting/:compliancePeriod/:complianceReportId/notional-transfers
/compliance-reporting/:compliancePeriod/:complianceReportId/fuels-other-use
/compliance-reporting/:compliancePeriod/:complianceReportId/fuel-exports
Story