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

Issue 585: Ensure that users cannot be added to "New" / "Inactive" / "Archived" projects #645

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

adeng27
Copy link
Collaborator

@adeng27 adeng27 commented Sep 30, 2024

Description

**** Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change. ****

The views where users could be added to projects were updated to be blocked for all projects that do not have the Active status.

Checks for the Project Detail Page:
PIs/Managers for a certain project can add other users to the project via the Add Users button under Manage Project. This button is disabled if the given project's status is not Active. If the user attempts to bypass this check by adding add-users-search/ to their URL (thus accessing the ProjectAddUsersSearchView, they are redirected back to the Project Detail page and an error message appears.

  • The ProjectAddUsersSearchResultsView is also blocked off for all projects without an Active status.

Checks for Join Page:
Users may send a join request for a project by navigating to /project/join/, where all projects with Active statuses are placed in a list. The ProjectJoinView was also blocked off for all non-active projects.

Fixes #585

Type of change

**** Please delete options that are not relevant. ****

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

**** Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration. ****

  • Manually checked that there was no way to add users to Inactive, Archived, or New projects.
  • Wrote/updated unit tests in coldfront.core.project.tests.test_views.test_add_user_views and coldfront.core.project.tests.test_views.test_join_views.

PR Self Evaluation

Strikethrough things that don’t make sense for your PR.

  • My code follows the agreed upon best practices
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (if needed)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in the appropriate modules
  • I have performed a self-review of my own code

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