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

Add concept of user groups #1062

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

Add concept of user groups #1062

wants to merge 7 commits into from

Conversation

ml-evs
Copy link
Member

@ml-evs ml-evs commented Mar 11, 2025

This PR adds the concept of groups of users, and the corresponding API routes and UIs. The aim of groups is to be able to provide blanket permissions to subsets of users. Some statements:

  • Users are created without any group.
  • Currently only admins can create groups and assign users to them, though it is already possible to list users as admins for a group (and in future they will control access).

Still to-do:

  • Use these in permissions lookups
  • Allow users to assign samples as visible to groups on creation and edit
  • Default permissions for groups

Copy link

codecov bot commented Mar 11, 2025

Codecov Report

Attention: Patch coverage is 74.78992% with 30 lines in your changes missing coverage. Please review.

Project coverage is 70.26%. Comparing base (81beb95) to head (6d01fdc).

Files with missing lines Patch % Lines
pydatalab/src/pydatalab/routes/v0_1/admin.py 57.14% 21 Missing ⚠️
pydatalab/src/pydatalab/mongo.py 64.70% 6 Missing ⚠️
pydatalab/src/pydatalab/login.py 66.66% 2 Missing ⚠️
pydatalab/src/pydatalab/routes/v0_1/users.py 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1062      +/-   ##
==========================================
+ Coverage   69.98%   70.26%   +0.28%     
==========================================
  Files          62       63       +1     
  Lines        4038     4140     +102     
==========================================
+ Hits         2826     2909      +83     
- Misses       1212     1231      +19     
Files with missing lines Coverage Δ
pydatalab/src/pydatalab/models/people.py 93.75% <100.00%> (+1.15%) ⬆️
pydatalab/src/pydatalab/routes/v0_1/__init__.py 100.00% <100.00%> (ø)
pydatalab/src/pydatalab/routes/v0_1/groups.py 100.00% <100.00%> (ø)
pydatalab/src/pydatalab/routes/v0_1/items.py 84.89% <ø> (+2.05%) ⬆️
pydatalab/src/pydatalab/routes/v0_1/users.py 91.07% <93.75%> (+0.82%) ⬆️
pydatalab/src/pydatalab/login.py 82.60% <66.66%> (-1.77%) ⬇️
pydatalab/src/pydatalab/mongo.py 76.19% <64.70%> (-2.92%) ⬇️
pydatalab/src/pydatalab/routes/v0_1/admin.py 63.52% <57.14%> (-5.71%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link

cypress bot commented Mar 11, 2025

datalab    Run #2974

Run Properties:  status check passed Passed #2974  •  git commit 07afc65d63 ℹ️: Merge 6d01fdc8dcc8e6c88016e2bf7864567a851bfdba into 81beb95f5b505ca74826aebb522f...
Project datalab
Branch Review ml-evs/user-groups
Run status status check passed Passed #2974
Run duration 06m 48s
Commit git commit 07afc65d63 ℹ️: Merge 6d01fdc8dcc8e6c88016e2bf7864567a851bfdba into 81beb95f5b505ca74826aebb522f...
Committer Matthew Evans
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 471
View all changes introduced in this branch ↗︎

@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from 8f3071c to 5da5920 Compare March 11, 2025 13:39
@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from 5da5920 to 34d5719 Compare March 11, 2025 13:45
@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from 4806a68 to 4123e7b Compare March 11, 2025 21:23
@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from 44e7058 to 92424a1 Compare March 11, 2025 21:46
@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from 92424a1 to eae5cdf Compare March 11, 2025 21:54
@ml-evs ml-evs force-pushed the ml-evs/user-groups branch from d56a0ab to 6d01fdc Compare March 14, 2025 14:25
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.

1 participant