Commit Graph

409 Commits

Author SHA1 Message Date
leigh-mil
e017cd12af Vue for adding multiple CLINs 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
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
George Drummond
0fa43021f8 Use python rather than string for primaryjoin 2019-06-05 11:12:46 -04:00
dandds
c90e574e83 Merge pull request #869 from dod-ccpo/filter-app-environment-roles
Filter out deleted application environment roles
2019-06-05 10:50:06 -04:00
Montana
e4cbe892fc Use clin values to render budget information
- creates a relationship `clins` on task order model
- two properties on task order model to calculate budget amounts
2019-06-05 09:40:10 -04:00
dandds
82e048387e Filter out deleted application environment roles 2019-06-05 09:34:55 -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
dandds
755fabd725 Database changes for new portfolio invitation flow.
- user_id is nullable on role tables
- invitation tables hold basic user information
2019-06-03 15:57:49 -04:00
leigh-mil
c60e1a29f6 Add CLIN table 2019-05-31 14:49:39 -04:00
leigh-mil
7bec073f78 Delete things related to deleted columns and table 2019-05-31 13:07:03 -04:00
leigh-mil
fbfb04d763 Update task order table and remove dd254 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
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
5fe895e109 Id() column type is for primary keys 2019-05-28 10:45:36 -04:00
richard-dds
e037c81338 Only allow one session 2019-05-28 10:44:40 -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
8980b04f7e Filter the roles relationship on applications to remove deleted roles 2019-05-23 11:07:54 -04:00
leigh-mil
86e315e56f Use members in application.users instead of roles 2019-05-23 09:51:32 -04:00
leigh-mil
9f66bbafe5 Raise NotImplementedError in AuditableMixin if the model does not have the properties portfolio_id or application_id 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
a65f758894 Add templates to display new audit events 2019-05-22 13:08:44 -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
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
richard-dds
32df561c6d Merge pull request #827 from dod-ccpo/stig-notifications
Create Notification System
2019-05-20 09:51:09 -04:00
dandds
c8682c0897 Use portfolio_role entity to display and update portfolio member info.
Previously, we were encoding the portfolio_role.user_id as part of the
form data for the portfolio admin page. This was convenient because it
allowed us to easily determine certain display attributes in the
template. Instead, we should rely on the PortfolioRole as the source of
truth for member information. This commit adds:

- Portfolio.owner_role to return the PortfolioRole of the owner
- explicitly passes the PortfolioRole IDs for the PPoC and current user
  to the template
- PortfolioRole.full_name for deriving the member name
2019-05-16 08:04:48 -04:00
richard-dds
a6c5f484b9 Add NotificationSender, one test 2019-05-15 14:57:46 -04:00
George Drummond
b8ea1349b2 Merge pull request #817 from dod-ccpo/delete-user-from-application
Delete an application member
2019-05-14 15:45:32 -04:00
George Drummond
f1299dc4b0 Add DELETE_APPLICATION_MEMBER permission 2019-05-14 13:39:20 -04:00
leigh-mil
addf2e97a1 Update form to nest all envs in one form 2019-05-14 10:58:22 -04:00
dandds
0da0f6a0ae WIP: use team form for application team page 2019-05-06 15:15:03 -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
b7a8cd4168 Refinements to the new application member modal
- remove extra padding from second modal screen
- update modal styles to more closely match designs
- ad `user_name` property to application_role model to fix flash message
2019-04-30 14:43:23 -04:00
dandds
ade77e6b91 Route for adding new application member
- domain method for creating a new application member
- ApplicationInvitations domain class
- nested form for adding a new user that holds user data, application
  permission sets, and environment roles
- Invitation service can infer invitation type based on role it's given
- new invitation email templates
2019-04-30 14:41:55 -04:00
dandds
054f6b80b9 add application_invitation table 2019-04-30 14:41:55 -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
Montana
94e3dc637a Remove has_member function from application model 2019-04-30 10:27:15 -04:00
Montana
19a09b792e Use user.id to check if user is in application 2019-04-29 13:38:17 -04:00
Montana
fec4687c02 Check for member in application function, not user function 2019-04-29 11:06:37 -04:00
Montana
c9deaeec72 Add is_app_member() to user model 2019-04-29 11:06:37 -04:00
George Drummond
769867c6a9 Display app users view only table 2019-04-17 13:25:45 -04:00
Montana
89b5bfdef5 User no longer has unique email 2019-04-17 11:06:10 -04:00
dandds
0bde431a70 extend soft delete functionality to app and env roles 2019-04-15 15:58:38 -04:00
dandds
dac764ab82 route for deleting an application 2019-04-15 15:58:38 -04:00
dandds
0348af7ce7 record soft deletion in audit log for applications and environments 2019-04-15 15:58:38 -04:00
dandds
1c0c5dd9c5 soft deletes available for applications and environments
- parent relation will not include applications or environments marked
  as deleted
- domain classes will exclude deleted objects from selections
- changed some test factories to use domain_word for resource names,
  because they were using person names and it bugged me
2019-04-15 15:58:38 -04:00
dandds
9084dce762 build out seed sample script
- semi-random data for applications and environments
- added users to applications and environments
- updated CSPRole enum with current CSP roles
2019-04-11 15:38:27 -04:00
dandds
b17741acd1 Adds an ORM permission set listener for application roles.
Application role changes will be recorded in the audit log. Generalizes
pre-existing listener that was in user for portfolio roles.
2019-04-08 14:00:26 -04:00