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

[DAPS, Foxx] - 1180 refactor Part 2 authz #1224

Merged
merged 74 commits into from
Jan 17, 2025
Merged

Conversation

JoshuaSBrown
Copy link
Collaborator

@JoshuaSBrown JoshuaSBrown commented Jan 9, 2025

PR Description

This PR is the second stage of refactoring of the authz feature. It includes using a strategy pattern for managing the different gridftp actions.

Tasks

  • - A description of the PR has been provided, and a diagram included if it is a new feature.
  • - Formatter has been run
  • - CHANGELOG comment has been added
  • - Labels have been assigned to the pr
  • - A reviwer has been added
  • - A user has been assigned to work on the pr
  • - If new feature a unit test has been added

Summary by Sourcery

Tests:

  • Added tests for authorization checks covering scenarios for admin users, regular users with/without ownership, and project administrators.

JoshuaSBrown and others added 30 commits December 19, 2024 14:44
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
Remove comment that is not useful.
core/database/foxx/api/repo.js Show resolved Hide resolved
core/database/foxx/api/repo.js Outdated Show resolved Hide resolved
core/database/foxx/api/repo.js Outdated Show resolved Hide resolved
core/database/foxx/api/repo.js Outdated Show resolved Hide resolved
core/database/foxx/tests/authz.test.js Outdated Show resolved Hide resolved
core/database/foxx/tests/user_router.test.js Show resolved Hide resolved
core/database/foxx/api/record.js Show resolved Hide resolved
core/database/foxx/api/record.js Show resolved Hide resolved
core/database/foxx/api/authz.js Show resolved Hide resolved
core/database/foxx/api/repo.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@t-ramz t-ramz left a comment

Choose a reason for hiding this comment

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

Added a few questions/comments! Looking at tests next.

core/database/foxx/api/authz.js Show resolved Hide resolved
core/database/foxx/api/authz.js Show resolved Hide resolved
core/database/foxx/api/authz.js Show resolved Hide resolved
Copy link
Collaborator

@t-ramz t-ramz left a comment

Choose a reason for hiding this comment

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

Added some comments on authz tests

core/database/foxx/tests/authz.test.js Show resolved Hide resolved
_id: data_id,
creator: "u/george",
},
{ waitForSync: true },
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is there a reason this is the first test waiting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought this might be a problem but it ended up not mattering.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've removed the calls to avoid any confusion.

core/database/foxx/tests/authz.test.js Show resolved Hide resolved
Copy link
Collaborator

@t-ramz t-ramz left a comment

Choose a reason for hiding this comment

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

Looks good, just make sure CI continues passing when merging #1225

@JoshuaSBrown JoshuaSBrown merged commit e7972b8 into devel Jan 17, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Database Relates to database microservice / data model Component: GridFTP Auth Module Relates to GridFTP authorization library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants