Skip to content

adds userservice - #312

Merged
jlaney merged 2 commits into
developfrom
task/add-userservice
Jun 17, 2026
Merged

jlaney merged 2 commits into
developfrom
task/add-userservice

Conversation

@jlaney

@jlaney jlaney commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@jlaney
jlaney requested a review from charlon June 16, 2026 14:40
@coveralls

coveralls commented Jun 16, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 27699618901

Coverage decreased (-1.1%) to 97.072%

Details

  • Coverage decreased (-1.1%) from the base build.
  • Patch coverage: 10 uncovered changes across 3 files (33 of 43 lines covered, 76.74%).
  • 2 coverage regressions across 1 file.

Uncovered Changes

File Changed Covered %
pathways/log.py 16 8 50.0%
pathways/dao/person.py 16 15 93.75%
pathways/views/init.py 3 2 66.67%
Total (5 files) 43 33 76.74%

Coverage Regressions

2 previously-covered lines in 1 file lost coverage.

File Lines Losing Coverage Coverage
pathways/log.py 2 52.38%

Coverage Stats

Coverage Status
Relevant Lines: 1093
Covered Lines: 1061
Line Coverage: 97.07%
Coverage Strength: 0.97 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR integrates django-userservice to centralize UWNetID resolution (including override/“act as” support) and updates views, settings, and tests to use it instead of uw_saml.utils.get_user.

Changes:

  • Add django-userservice dependency and wire it into the Docker Django settings (installed app, middleware, auth/validation hooks).
  • Switch page + user-preference API codepaths to derive UWNetID via UserService.
  • Expand person DAO output for non-students and add UWNetID validation; update tests accordingly.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
setup.py Adds django-userservice dependency.
pathways/views/pages.py Uses UserService for UWNetID in page context/person lookup.
pathways/views/api/user.py Uses UserService to associate preferences with the current UWNetID.
pathways/views/__init__.py Adds override authorization hook for userservice.
pathways/log.py Introduces request-scoped user/actas logging via middleware + log filter.
pathways/dao/person.py Returns base identity fields for non-students; adds valid_uwnetid.
docker/settings.py Enables userservice app/middleware and configures validation/override hooks.
docker/urls.py Routes /support/ to userservice URLs and moves persistent message URLs.
pathways/tests/test_views.py Updates view tests to use userservice middleware and patched netid.
pathways/tests/test_person.py Updates DAO expectations and adds validation tests.
pathways/tests/test_api.py Updates API test setup for userservice session/middleware.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/settings.py
Comment thread pathways/log.py
Comment thread pathways/tests/test_views.py
Comment thread pathways/tests/test_api.py
Comment thread pathways/views/__init__.py
Comment thread pathways/dao/person.py
@jlaney
jlaney merged commit 052fd11 into develop Jun 17, 2026
6 of 7 checks passed
@jlaney
jlaney deleted the task/add-userservice branch June 17, 2026 18:33
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.

4 participants