Skip to content

Implemented Route Testing for Issue 1489#1568

Closed
Andrew-Bonner wants to merge 88 commits intoOpenEnergyDashboard:developmentfrom
Andrew-Bonner:dev
Closed

Implemented Route Testing for Issue 1489#1568
Andrew-Bonner wants to merge 88 commits intoOpenEnergyDashboard:developmentfrom
Andrew-Bonner:dev

Conversation

@Andrew-Bonner
Copy link
Copy Markdown

@Andrew-Bonner Andrew-Bonner commented Feb 2, 2026

Description

This change adds tests that verify all user roles against the various authMiddleware functions for each route to ensure proper access control is enforced where required. The tests also include a check that scans all routes in OED to confirm they are covered. Additionally, the tests flag any routes that are either missing from the test suite or included in the tests but no longer exist in OED.

Fixes #1489

(In general, OED likes to have at least one issue associated with each pull request. Replace [issue] with the OED GitHub issue number. In the preview you will see an issue description if you hover over that number. You can create one yourself before doing this pull request. This is where details are normally given on what is being addressed. Note you should not use the word "Fixes" if it does not completely address the issue since the issue would automatically be closed on merging the pull request. In that case use "Partly Addresses #[issue].)

Type of change

(Check the ones that apply by placing an "x" instead of the space in the [ ] so it becomes [x])

  • Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

(Note what you have done by placing an "x" instead of the space in the [ ] so it becomes [x]. It is hoped you do all of them.)

  • I have followed the OED pull request ideas
  • I have removed text in ( ) from the issue request
  • You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

(Describe any issues that remain or work that should still be done.)

Zachary-Squires and others added 30 commits August 21, 2025 13:16
…fy sanitizer and patch XSS in success/failure responses"
up to date. package-lock.json and package.json
should match now.
Normalize all line endings to LF
Changed the installOED.sh file to generate randomized values for OED_TOKEN_SECRET and POSTGRES_PASSWORD, which are then stored in .env file. Changed docker.compose.yml to draw from the .env file if variables exist there. When in dev mode with the default values the user will be warned in the console when OED is started. Also implemented a warning for the mailing variables, if the method is set and a default remains in the rest the user will be warned in production.
This reverts commit 489cc17, reversing
changes made to f38a83e.
Remove line endings fix, will be implemented separately.
Restoring default value of OED_PRODUCTION
Andrew-Bonner and others added 25 commits December 11, 2025 01:58
Added meeting notes for the client meeting held on November 5, 2025, including agenda items and group progress updates.
Updated meeting notes with group progress and mentor suggestions.
Added meeting notes for the client meeting on November 12th, 2025.
Added meeting notes for client meeting on November 12th, 2025, detailing issues discussed and progress made.
Added each issue as a risk, with probability, impact, and solution.
Add a single instance before the tests
@huss
Copy link
Copy Markdown
Member

huss commented Feb 5, 2026

Thank you to @Andrew-Bonner for this PR. Two items:

  1. The description is not filled out per the template and the OED developer help pages.
  2. The files listed as changed include .github/workflows and the rest seem to relate to PR Centralize and Fix DOMPurify Sanitizer #1544. I don't see the new tests for route authorization. Please let me know if I am missing something here.

I'm not going to review this PR until these two items are resolved. Please let me know if anything is not clear or you need something.

@huss
Copy link
Copy Markdown
Member

huss commented Mar 17, 2026

2. The files listed as changed include .github/workflows and the rest seem to relate to PR Centralize and Fix DOMPurify Sanitizer #1544. I don't see the new tests for route authorization. Please let me know if I am missing something here.

@Andrew-Bonner I thought you had indicated to me a while back that this was ready for review. However, when I looked at it now it seems there are still extra changes in files. Did I make a mistake about it being ready? Do you know what is up?

@huss
Copy link
Copy Markdown
Member

huss commented Mar 30, 2026

I just noticed that the associated issue this fixes is issue #1527 and not PR 1489 as in the description. If I'm correct then that should be updated so it properly closes the issue.

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.

7 participants