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

Beamline Groups & Filtering #203

Merged
merged 127 commits into from
Nov 3, 2022
Merged

Beamline Groups & Filtering #203

merged 127 commits into from
Nov 3, 2022

Conversation

stufisher
Copy link
Collaborator

@stufisher stufisher commented Jul 21, 2022

Implements the fundamental authorisation schema:

  • all proposals
  • proposals on specific beamlines
  • proposals via SessionHasPerson

Also implements some of the core resources and authorises them as above.
Moves the legacy resources to /legacy to avoid collision and make clear these are deprecated for removal, as well as moving some files into a legacy folder to be clear about their status too

Closes #213
Closes #166

@stufisher stufisher marked this pull request as draft July 21, 2022 15:20
@codecov-commenter
Copy link

codecov-commenter commented Jul 21, 2022

Codecov Report

Merging #203 (d875d26) into master (b4e1f53) will increase coverage by 1.57%.
The diff coverage is 72.08%.

@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
+ Coverage   68.64%   70.21%   +1.57%     
==========================================
  Files          72       84      +12     
  Lines        2411     3307     +896     
==========================================
+ Hits         1655     2322     +667     
- Misses        756      985     +229     
Impacted Files Coverage Δ
pyispyb/core/routes/legacy/data_collections.py 90.90% <ø> (ø)
pyispyb/core/routes/legacy/proposals.py 100.00% <ø> (ø)
pyispyb/core/routes/legacy/sessions.py 100.00% <ø> (ø)
pyispyb/core/schemas/shipping.py 0.00% <0.00%> (ø)
pyispyb/core/routes/user.py 60.00% <27.27%> (-25.72%) ⬇️
pyispyb/app/extensions/database/utils.py 50.00% <35.71%> (+13.88%) ⬆️
pyispyb/core/modules/datacollections.py 40.00% <40.00%> (ø)
pyispyb/core/routes/labcontacts.py 60.00% <44.44%> (-8.19%) ⬇️
pyispyb/core/modules/labcontacts.py 46.34% <46.15%> (-3.66%) ⬇️
pyispyb/core/routes/datacollections.py 51.38% <51.38%> (ø)
... and 38 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b4e1f53...d875d26. Read the comment docs.

@stufisher stufisher force-pushed the 158-save-server-and-client-configuration-in-db branch from 89d4733 to 55076cf Compare July 26, 2022 13:25
Base automatically changed from 158-save-server-and-client-configuration-in-db to master July 26, 2022 13:56
@stufisher stufisher force-pushed the beamline-groups-permissions branch from 323e9ec to 8763fe4 Compare July 26, 2022 14:37
@stufisher stufisher added the enhancement New feature or request label Jul 26, 2022
@stufisher stufisher force-pushed the beamline-groups-permissions branch from 66e4d78 to 5ffbc50 Compare September 14, 2022 05:38
@stufisher stufisher requested a review from mgaonach September 23, 2022 06:11
docs/authorization.md Show resolved Hide resolved
docs/authorization.md Show resolved Hide resolved
pyispyb/app/extensions/database/definitions.py Outdated Show resolved Hide resolved
pyispyb/app/extensions/database/definitions.py Outdated Show resolved Hide resolved
pyispyb/app/extensions/database/definitions.py Outdated Show resolved Hide resolved
pyispyb/app/extensions/database/definitions.py Outdated Show resolved Hide resolved
pyispyb/core/routes/datacollections.py Show resolved Hide resolved
pyispyb/filters.py Show resolved Hide resolved
@stufisher stufisher mentioned this pull request Sep 27, 2022
@mgaonach
Copy link
Collaborator

mgaonach commented Oct 13, 2022

I made a tentative to remove the need to have beamLineGroups passed along from every route to the authorization method.

I basically added the app object to the g object so that we can access it from anywhere. This way it gives easy acces to db_options and anything else that we might put there in the future.

I moved the commit for that in a separate branch : 194bc8a

Feel free to have a look and take it if it seems good to you.

@stufisher stufisher force-pushed the beamline-groups-permissions branch from 4d8e16c to cdb03e7 Compare October 26, 2022 06:56
@stufisher stufisher marked this pull request as ready for review October 26, 2022 06:56
@stufisher stufisher merged commit e748192 into master Nov 3, 2022
@stufisher stufisher deleted the beamline-groups-permissions branch November 3, 2022 09:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement basic authorization Tidy existing permissions and document
4 participants