Commit Graph

587 Commits

Author SHA1 Message Date
leigh-mil
41820813ed Add in route for CCPO users page and permissions to view page 2019-08-05 15:23:17 -04:00
leigh-mil
74d4974437 Clean up code from old version of TO builder 2019-07-18 13:33:37 -04:00
leigh-mil
3401713898 Only delete and add CLINs to a TO when they are passed in the form data 2019-07-18 10:31:45 -04:00
dandds
94d8680361 Do not return deactivated portfolios in Portfolios.for_user 2019-06-19 10:39:42 -04:00
leigh-mil
a94bc3c14f remove duplicate logged out flash message 2019-06-17 13:32:29 -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
6b09f80336 Remove TaskOrderError 2019-06-13 15:38:38 -04:00
George Drummond
24355b0737 Remove unused PortfolioRoles methods 2019-06-13 15:31:48 -04:00
George Drummond
37a1ab14b0 Remove Environments.add_member 2019-06-13 15:20:21 -04:00
George Drummond
36f9075451 Remove Applications.get_all 2019-06-13 15:10:33 -04:00
dandds
06f4aeb74d Merge pull request #880 from dod-ccpo/to-review-modal
TO Review Submit Modal
2019-06-11 13:10:17 -04:00
Montana
8446a79a9a Sign TO in post route 2019-06-11 12:06:11 -04:00
George Drummond
5bcfcc1568 Fix issue with db.session.commit history and disabling portfolio role 2019-06-11 11:30:37 -04:00
George Drummond
cad43af455 Portfolio archiving 2019-06-11 11:30:37 -04:00
richard-dds
30ef2a67ef Fix bug in application member deletion 2019-06-10 16:43:47 -04:00
richard-dds
7f4f857424 Sort task orders by status and time_created 2019-06-10 15:16:02 -04:00
leigh-mil
00f323f9f5 Only call commit() once and use translations in template 2019-06-10 14:09:31 -04:00
leigh-mil
732830a500 Fix form so TO saves properly 2019-06-10 12:29:54 -04:00
leigh-mil
36200e01ad Create CLINs when creating a TO 2019-06-10 12:29:54 -04:00
dandds
318257e32c File length validation for task order upload 2019-06-06 13:57:07 -04:00
dandds
bd4f2b3dde Delete unused Applications domain method and invitation service 2019-06-05 15:02:22 -04:00
dandds
fa50c01e48 New backend flow for application invitations.
Like portfolio invitations, now a user is not associated with an
application role until they accept the associated invitation.
- domain method for inviting user to application
- change application route for inviting a member
- ApplicationRole model knows user name from invitation
2019-06-05 15:02:22 -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
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
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
richard-dds
6a504fdf89 Merge pull request #834 from dod-ccpo/limit-concurrent-logins
Prevent multiple active sessions
2019-05-29 16:19:58 -04:00
richard-dds
c653cf2dbf Display a flash message when a user logs out 2019-05-28 16:55:52 -04:00
dandds
96ae1bba9d Merge pull request #845 from dod-ccpo/app-settings-role-id
Use role ID for app settings table
2019-05-28 11:43:56 -04:00
richard-dds
5dcbee333a Make session limiter configurable 2019-05-28 10:45:12 -04:00
richard-dds
e037c81338 Only allow one session 2019-05-28 10:44:40 -04:00
dandds
43ea922218 Simplify environment role updates in app settings.
Use ApplicationRole.id instead of User.id in forms. This eliminates the
need for the function that checks whether a user is in a given
application, because looking up the application role will raise an error
if the user is not.
2019-05-24 13:35:00 -04:00
dandds
129f5e3031 Rewrite function that builds form data for app environment roles form.
- Adds a property to ApplicationRole model so that it knows its related
  EnvironmentRole models.
- Rewrite the form data builder in the routes file so that it loops the
  application members and their environment roles to build the data
  structure.
2019-05-24 13:34:53 -04:00
leigh-mil
48fbc1c997 Merge pull request #840 from dod-ccpo/update-team-members-count
Update team members number on app index page
2019-05-24 10:15:28 -04:00
leigh-mil
8980b04f7e Filter the roles relationship on applications to remove deleted roles 2019-05-23 11:07:54 -04:00
dandds
a332d1432e Use application_role.id to reference users in team page forms.
Membership in a resource should be decoupled from the users table.
2019-05-23 10:13:57 -04:00
George Drummond
da6ac57812 Merge pull request #836 from dod-ccpo/sidebar
Applications users were invited to were not showing in the portfolios sidebar
2019-05-22 15:22:05 -04:00
George Drummond
41e2d14e7d Use sqlalchemy or_ 2019-05-22 15:17:31 -04:00
George Drummond
b61f304bad Make one query 2019-05-22 13:32:13 -04:00
George Drummond
9098bc7c0b Reduce number of queries performed during the lookup 2019-05-22 13:24:57 -04:00
leigh-mil
7756ab8c28 Notes about unused methods that need more research 2019-05-22 13:12:48 -04:00
leigh-mil
5e2f00b1c2 Add perms for viewing application log 2019-05-22 13:12:48 -04:00
leigh-mil
a1eb7ec935 Make sure all log events have portfolio and app ids (where applicable) 2019-05-22 13:08:44 -04:00
leigh-mil
927d1b7925 Add audit log to app settings page 2019-05-22 13:08:44 -04:00
leigh-mil
b3ecd1658c Add application_id column to AuditEvent
Use application_id and portfolio_id if the resource is a portfolio in AuditableMixin
Clean up some residual references to workspace
2019-05-22 13:08:44 -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
8add5b4e22 Filter deleted environment roles from top-level domain method. 2019-05-21 14:08:14 -04:00
dandds
f7c3fe572b Raise error if CRL download fails.
The download method for Libcloud objects returns a boolean, which means
that our CRL download could fail silently. The RackspaceCRLProvider
would not raise an error until it tried to open the full path for the
downloaded resource. This checks the return status of the download call
and raises an error if the download failed. For reference:

https://libcloud.readthedocs.io/en/latest/storage/api.html#libcloud.storage.base.StorageDriver.download_object
2019-05-15 14:38:33 -04:00