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

Allow admins to view and edit users #168

Merged
merged 2 commits into from
Nov 14, 2024

Conversation

lkeegan
Copy link
Member

@lkeegan lkeegan commented Nov 14, 2024

  • backend
    • add /admin/users/ endpoint to get a list of users
    • refactor admin endpoints into separate files for languages, milestones, users, questions
    • refactor tests to also create a temporary in-memory users database for each test
      • add pytest-asyncio to allow use of async fixtures
    • refactor tests to be fully independent of each other
      • new app & new temp dirs for each test
      • makes test suite slower to run but easier to maintain
    • remove DATA_FILES_PATH as we already have STATIC_FILES_PATH and PRIVATE_FILES_PATH
  • admin-frontend
    • add users tab with table of users whose permissions can be edited
  • resolves Add Users tab to admin interface #164

@codecov-commenter
Copy link

codecov-commenter commented Nov 14, 2024

Codecov Report

Attention: Patch coverage is 87.97251% with 35 lines in your changes missing coverage. Please review.

Project coverage is 31.01%. Comparing base (d71691a) to head (d79fe2d).

Files with missing lines Patch % Lines
frontend/src/lib/components/Admin/Users.svelte 0.00% 32 Missing and 1 partial ⚠️
frontend/src/lib/components/AdminPage.svelte 0.00% 1 Missing ⚠️
.../src/mondey_backend/routers/admin_routers/users.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #168      +/-   ##
==========================================
+ Coverage   30.39%   31.01%   +0.61%     
==========================================
  Files          95      100       +5     
  Lines        3287     3373      +86     
  Branches       92       93       +1     
==========================================
+ Hits          999     1046      +47     
- Misses       2218     2256      +38     
- Partials       70       71       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lkeegan lkeegan force-pushed the fix_164_add_users_endpoint_and_admin_interface branch 2 times, most recently from 66f5aea to ae339c1 Compare November 14, 2024 13:18
@lkeegan lkeegan requested a review from MaHaWo November 14, 2024 13:25
@lkeegan lkeegan force-pushed the fix_164_add_users_endpoint_and_admin_interface branch from ae339c1 to 2e813dc Compare November 14, 2024 13:51
- backend
  - add /admin/users/ endpoint to get a list of users
  - refactor admin endpoints into separate files for languages, milestones, users, questions
  - refactor tests to also create a temporary in-memory users database for each test
    - add pytest-asyncio to allow use of async fixtures
  - refactor tests to be fully independent of each other
    - new app & new temp dirs for each test
    - makes test suite slower to run but easier to maintain
  - remove DATA_FILES_PATH as we already have STATIC_FILES_PATH and PRIVATE_FILES_PATH
- admin-frontend
  - add users tab with table of users whose permissions can be edited
- resolves #164
@lkeegan lkeegan force-pushed the fix_164_add_users_endpoint_and_admin_interface branch from c1b3327 to bf0f3dd Compare November 14, 2024 13:53
Copy link

sonarcloud bot commented Nov 14, 2024

Copy link
Collaborator

@MaHaWo MaHaWo left a comment

Choose a reason for hiding this comment

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

maybe it would be better to remove the default image entirely here.

@lkeegan
Copy link
Member Author

lkeegan commented Nov 14, 2024

maybe it would be better to remove the default image entirely here.

true, but I'll do it in a separate PR, with all the unrelated refactoring this PR has already diverged enough from what its title claims it is about!

@lkeegan lkeegan merged commit e405e47 into main Nov 14, 2024
6 checks passed
@lkeegan lkeegan deleted the fix_164_add_users_endpoint_and_admin_interface branch November 14, 2024 14:08
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.

Add Users tab to admin interface
3 participants