71 Commits

Author SHA1 Message Date
leigh-mil
d300ccf31b Catch error on update applications route when app name is duplicated within a portfolio 2019-12-18 10:54:18 -05:00
leigh-mil
22dd5d7b85 Add migration for enforcing uniqueness of an application name within a portfolio and update create/update Applicaiton domain methods. 2019-12-16 14:39:32 -05:00
graham-dds
a097a0ce61 Refactor New Portfolio page according to designs.
New designs call for a streamlined New Portfolio page, with far
fewer input options. This commit refactors that page according to those
designs.

Some of the route functions in this commit refer to a "step 1" of creating
a new Portfolio. Though there is no "step 2" right now, the designs call
for a multistep flow for Portfolio creation process, so this commit sets
the stage for that.
2019-12-13 13:17:30 -05:00
leigh-mil
74ff581570 Remove route for /portfolios 2019-12-03 15:43:06 -05:00
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
graham-dds
fea8c9bce9 Remove developer styleguide from project
Since we're actively moving our styles toward a pure of a USWDS
implementation as possible, this styleguide page is becoming
increasingly outdated.
2019-11-19 13:34:14 -05:00
graham-dds
a1c672d89f Conditionally skip tests related to audit log 2019-10-21 11:36:53 -04:00
leigh-mil
4d043363a7 Create route for resending an app invite
Replace ApplicationInvitations._update_status() with revoke() because multiple functions used _update_status() and it was causing app roles to be disabled when they shouldn't have. Now app roles are disabled within the revoke function.
Updated Invitations.resend() to accept user details so the invite info
can be changed in the new invite
2019-10-08 15:59:16 -04:00
leigh-mil
1435734969 Add monkeypatch to mock handle_error() 2019-10-02 10:45:22 -04:00
leigh-mil
5c54c043c0 Add route for applications.revoke_invite 2019-09-26 09:46:23 -04:00
graham-dds
a96c2b3cdd Update / create new tests for application creation 2019-09-24 10:16:49 -04:00
leigh-mil
93530e903f Create route for updating app member 2019-09-18 11:16:54 -04:00
richard-dds
79c8e4fc63
Merge pull request #1062 from dod-ccpo/env-provisioning-task
Environment provisioning background jobs
2019-09-16 09:58:18 -04:00
graham-dds
2af0a2ecaf Update existing tests for new CLIN logic
- Factory adds total_amount field, which is always greater than obligated
field
- add total_amount field on tests that create TOs manually
- update tests that calculate total_contract_amount and
total_obligated_amount
2019-09-12 16:11:12 -04:00
leigh-mil
ddcd91964f Remove route 'applications.update_env_roles' and related functions and tests 2019-09-11 15:29:09 -04:00
richard-dds
1a9c34d856 Fix and test environment dispatch tasks 2019-09-11 11:43:06 -04:00
leigh-mil
de74c1f533 Remove route for applications.team 2019-09-05 16:18:47 -04:00
dandds
d62027b2e7
Merge pull request #1046 from dod-ccpo/tests-debug
Enable debug mode in tests.
2019-09-03 16:08:42 -04:00
dandds
883947b75f Enable debug mode in tests.
Debug mode allows route integration tests to raise explicit exceptions on
errors, instead of returning error pages. Some portions of the test
suite need to be able to ignore exceptions (the response is not under
test) so they use a separate pytest fixture version of the app and
client that are configured with debug disabled, as it would be in
production.
2019-08-30 15:32:57 -04:00
graham-dds
38ba8b7e5f LOAs are so out of this codebase 2019-08-30 09:57:23 -05:00
leigh-mil
e35399d8f5 Update route function to revoke CCPO superuser status 2019-08-13 10:32:26 -04:00
leigh-mil
fa83dfe6bd When user not found, redirect to users page and show flash message 2019-08-09 11:08:23 -04:00
leigh-mil
864e11ea11 Remove redundant 'ccpo' from ccpo route function names 2019-08-09 11:08:23 -04:00
leigh-mil
1f8337485f Move ccpo routes into their own file 2019-08-09 11:08:22 -04:00
leigh-mil
5b008e044a Add tests 2019-08-09 10:50:34 -04:00
richard-dds
736e2aa21d
Merge pull request #994 from dod-ccpo/cloud-pdf-uploads
CSP PDF uploads
2019-08-08 11:17:07 -04:00
leigh-mil
9cf72e9466 Update name of permission 2019-08-06 10:38:58 -04:00
leigh-mil
41820813ed Add in route for CCPO users page and permissions to view page 2019-08-05 15:23:17 -04:00
richard-dds
3d414e1a60 Fix TO upload tests 2019-08-05 14:58:10 -04:00
leigh-mil
e3dfd18c7f Raise error if TO review or signature page are accessed when the TO is incomplete 2019-07-18 13:33:37 -04:00
leigh-mil
4826e8002b Rename route functions to be clearer 2019-07-18 10:31:45 -04:00
leigh-mil
e3c6b08d34 Remove old task order edit and update routes 2019-07-18 10:31:45 -04:00
leigh-mil
2ea0efb60a Update test 2019-06-20 14:38:55 -04:00
leigh-mil
a0f6d98d28 Remove more unnecesary tests 2019-06-20 14:28:56 -04:00
leigh-mil
4e46827335 Remove nesting from route when not needed 2019-06-12 15:30:25 -04:00
dandds
30b93d1c50 Remove unused TO code. 2019-06-12 14:27:36 -04:00
George Drummond
cad43af455
Portfolio archiving 2019-06-11 11:30:37 -04:00
leigh-mil
580c6ce3ab Fix rebase 2019-06-05 12:58:33 -04:00
leigh-mil
b97ae02a93 Combine similar routes and templates, delete unused TO form templates 2019-06-05 12:58:33 -04:00
leigh-mil
91e41199b7 Update TO form based on new model 2019-06-05 12:58:33 -04:00
George Drummond
f7562714cb
Add New Portfolio Workflow 2019-06-04 13:10:42 -04:00
dandds
4f8e9cddc8 Merge portfolio members routes with invitations.
`portfolios.create_member` now just sends an invitation, so it should be
with the invitation routes. This also de-duplicates the function for
sending a portfolio invitation email.
2019-06-03 15:57:49 -04:00
leigh-mil
7bec073f78 Delete things related to deleted columns and table 2019-05-31 13:07:03 -04:00
dandds
df06d1b62f Use application_role_id on environment_roles.
In the future, an `application_invitation1 will not refer to a `user` until
someone accepts the invitation; they'll only reference an
`application_role`. When a user is invited to an application, the
inviter can specify the environments the invitee should have access to.
For this to be possible, an `environment_role` should reference an
`application_role`, because no `user` entity will be known at that time.

In addition to updating all the models and domain methods necessary for
this change, this commit deletes unused code and tests that were
dependent on `environment_roles` having a `user_id` foreign key.
2019-05-31 11:21:20 -04:00
George Drummond
6487fe91ba
Applications users were invited to were not showing in the portfolios
sidebar
2019-05-22 11:19:13 -04:00
dandds
3c1f4ac6df Standardize token argument in routes.
- `token` becomes `portfolio_token` in routes.
- Find relevant portfolio from token in `before_request` hook, like
  other routes.
2019-05-06 16:35:33 -04:00
dandds
42b912d4cb Look up major database resources in a before_request hook.
A `before_request` hook queries the database for portfolios, requests,
and task orders based on the route arguments. The resources are added as
attributes on `g`. The portfolio context processor and the access
decorator now rely on those resources being available on `g`.

WIP: find major resources in before_request hook, apply to g

WIP: use g.portfolio for portfolio context processor

WIP: the access decorator should rely on the resources being available on g
2019-05-06 16:32:55 -04:00
dandds
59a02572ea Application users should have access to portfolio landing page.
- Adds override to portfolio landing page access check to see if user
  has access to any applications within the portfolio.
- Route for accepting an application invitation redirects directly to
  portfolio applications route.
- Tests ensure application user only sees apps the user has access to on
  the portfolio landing page.
2019-05-03 17:11:57 -04:00
dandds
a2ebdf78a0 Route for accepting an application invitation.
- Domain method for enabling an application role.
- Updated ApplicationRole model `history` property so that it serializes
  the `status` correctly
2019-05-03 17:11:57 -04:00
dandds
c4ad7b4378 Make portfolio invitation specific to portfolio
- add a base domain class
- extract shared model code to mixin
- rename invitation classes
- invitation model relationship to portfolio_role name is now more
  generic "role"
2019-04-30 14:41:55 -04:00