Skip to content

[ENG-7966] Add "collected-in" relationship for Nodes #11140

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

Open
wants to merge 2 commits into
base: feature/pbs-25-10
Choose a base branch
from

Conversation

Johnetordoff
Copy link
Contributor

@Johnetordoff Johnetordoff commented May 12, 2025

Purpose

adds new relationship for collections a node is in.

Changes

  • splits up node detail tests into more workable files <500 that are more atomic
  • add related view for collection to nodes detail
  • adds tests and permissions classes

QA Notes

Please make verification statements inspired by your code and what your code touches.

  • Verify
  • Verify

What are the areas of risk?

Any concerns/considerations/questions that development raised?

Documentation

Side Effects

Ticket

https://openscience.atlassian.net/browse/ENG-7966

@Johnetordoff Johnetordoff changed the base branch from develop to feature/pbs-25-09 May 12, 2025 16:21
@Johnetordoff Johnetordoff force-pushed the add-collected-in-relationship branch from a5b9a4d to e8ce827 Compare May 12, 2025 16:54
@Johnetordoff Johnetordoff force-pushed the add-collected-in-relationship branch from e8ce827 to b108fce Compare May 12, 2025 20:26
@Johnetordoff Johnetordoff changed the title [WIP] Add "collected-in" relationship for Nodes [ENG-7966] Add "collected-in" relationship for Nodes May 13, 2025
@Johnetordoff Johnetordoff force-pushed the add-collected-in-relationship branch from 0940d4b to bf12238 Compare May 13, 2025 16:33
@Johnetordoff Johnetordoff force-pushed the add-collected-in-relationship branch from bf12238 to 26c8e2b Compare May 13, 2025 17:00
@Johnetordoff Johnetordoff marked this pull request as ready for review May 13, 2025 17:27
@brianjgeiger brianjgeiger changed the base branch from feature/pbs-25-09 to feature/pbs-25-10 May 16, 2025 12:39
Copy link
Collaborator

@brianjgeiger brianjgeiger left a comment

Choose a reason for hiding this comment

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

I think you may have added a redundant permissions class, but otherwise looks good. Does the count in the meta only show if you've included the related counts query parameter?

@@ -183,6 +183,19 @@ def has_object_permission(self, request, view, obj):
return request.method in permissions.SAFE_METHODS
return True


class ReadOnlyIfPublicOrContributor(permissions.BasePermission):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't the ContributorOrPublic permission class do this?

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.

2 participants