33 Commits

Author SHA1 Message Date
Philip Kalinsky
69bd2f43a5 provision portfolio state machine 2020-01-14 16:36:16 -05:00
leigh-mil
79b2773852 Portfolio manager invite updates:
- Update the form to use BooleanFields for the permissions and make the
form more similar to the Application Members form
- Use MemberFormTemplate macro in the portfolio settings template
- fix tests affected by the form changes
2020-01-10 10:25:55 -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
leigh-mil
614514d6a2 Update tables to match business logic 2019-12-02 14:46:11 -05:00
richard-dds
f6cb6f2a31 Change Environment.creator relation from ApplicationRole to User 2019-09-11 11:42:59 -04:00
dandds
24b2d95f03 Application members should not see deleted applications.
This updates the `Portfolios.for_user` method to screen out deleted
ApplicationRole entities. For extra assurance, we also mark application
roles as disabled when they are deleted.
2019-08-15 10:20:30 -04:00
dandds
94d8680361 Do not return deactivated portfolios in Portfolios.for_user 2019-06-19 10:39:42 -04:00
George Drummond
4d7ad667b7
Remove Portfolios.can_revoke_access_for 2019-06-13 15:49:36 -04:00
George Drummond
490907257b
Remove Portfolios.revoke_access 2019-06-13 15:48:39 -04:00
George Drummond
cad43af455
Portfolio archiving 2019-06-11 11:30:37 -04:00
dandds
c085db23d7 New invitation backend for portfolio invitations.
Portfolio invitations do not associate a user entity until the
invitation has been accepted. User info, including DOD ID, is held on
the invitation itself. When a user accepts and invitation, their user
entry is associated with the corresponding `portfolio_role` entry.

The same change will be applied to `application_role` and application
invitations. For now, small changes have been made to
application-related methods so that that flow works as-is.
2019-06-03 15:57:49 -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
a9fac1ca59
Add in missing test 2019-05-22 11:19:14 -04:00
dandds
078264bec7 add access tests for all access-protected routes
- cleans up skipped access tests in domain tests
- cleans up other skipped tests that are no longer relevant
2019-03-22 06:33:01 -04:00
dandds
4a0dd2d432 remove unused domain methods and arguments 2019-03-22 06:31:20 -04:00
dandds
de7c69bde7 apply access decorator to routes 2019-03-22 06:30:21 -04:00
dandds
0ea21fbb9b remove access checks from domain methods 2019-03-22 06:30:02 -04:00
dandds
366ada5a90 check sitewide perms for portfolio access, restore ccpo tests 2019-03-21 05:38:28 -04:00
dandds
bec5d11bfe users have permission sets for site-wide perms 2019-03-21 05:38:28 -04:00
dandds
23584da57b changes to increase test branch coverage 2019-03-15 14:41:24 -04:00
dandds
b0e48134b0 trim old permissions list 2019-03-15 07:14:49 -04:00
dandds
ad56ddc60e implement PermissionSets.get_many for getting multiple permission sets by name 2019-03-15 07:14:49 -04:00
dandds
78aa2dfcc6 permission set names should be constants on the domain class 2019-03-15 07:14:49 -04:00
dandds
d3c3209fc0 cleanup unused portfolio roles 2019-03-15 07:14:49 -04:00
dandds
1a122c5335 rename role -> permission_set everywhere 2019-03-15 07:14:49 -04:00
dandds
720c227c32 remove frontend role selection for edit member 2019-03-15 07:14:49 -04:00
dandds
0eb2d4fa3c remove frontend role selection for new member 2019-03-15 07:14:49 -04:00
dandds
0c2ab6fb7a remove portfolio_role direct relationship to role 2019-03-15 07:14:49 -04:00
dandds
44a4d98978 switch portfolio authorization to rely on new permission sets 2019-03-15 07:14:49 -04:00
Patrick Smith
2c62f54b83 Remove request-related models 2019-02-25 14:54:14 -05:00
Montana
ef85340baa Add to test 2019-01-23 15:47:00 -05:00
Montana
1d2befa660 Fix test 2019-01-23 14:45:29 -05:00
dandds
d3d36822df workspace -> portfolio everywhere 2019-01-14 16:00:17 -05:00