Open haudquaquam opened 5 months ago
Also, it'd be good to codify this behavior with some unit tests insofar as they don't already exist.
I.e., for each of the relevant views, add a test that a user can/can't join/be added.
(I'll update the docs as well.)
Check whether users can be added to a
Project
with the "New", "Inactive", or "Archived" statuses:Project
that is "New," "Inactive," or "Archived" from the "Join a Project" page. Only "Active"Projects
are listed.Projects
by going to/project/##
, where##
represents the project ID of aProject
.Project
, no. The PI of a "New"Project
can access the "Add a User" button and go through the flow of adding a user, however upon submission, the following error message shows:Project does not have a LBL Project ID for billing. You cannot add users until one is set.
Project
, yes. The PI can access the "Add a User" button and successfully add a user. This probably should not be allowed.Project
, no. The PI cannot make any changes to an "Archived"Project
.Changes
project_detail
template, added logic that makes the 'Add User' button functional only if the project's status is 'Active'. Otherwise, the button is disabled./add-users-search
to add users. Manually inserting this into the URL would still allow a PI/manager to visit the page and successfully add a user to an "Inactive"Project
.ProjectAddUsersSearchView
to disallow accessing/add-users-search
to add users to a non-active project. Initially, this only applied to "Archived"Projects
./add-users-search
for anyProject
that is not "Active" will display a banner that says, "You cannot add users to a [new, inactive, archived] project."