58 Commits

Author SHA1 Message Date
tomdds
e702c42fa5 Merge branch 'staging' into environment-mgmt-grp-provisioning 2020-02-04 17:05:24 -05:00
tomdds
1a7db62dac Remove Environment level user provisioning 2020-02-04 15:22:34 -05:00
tomdds
17ec944ad5 Update environment queries to look for app provisioning completion as well 2020-02-04 15:22:34 -05:00
dandds
05f6b36ece Update SQL query to find pending portfolios.
The query to find portfolios that are pending provisioning is updated to
check for:

- a period of performance that has started
- a portfolio state machine that has an UNSTARTED or one of the CREATED
  states

I left several TODOs to ensure that the orchestration functions
correctly for portfolio.
2020-02-04 10:16:02 -05:00
leigh-mil
17864cc060 Add migration to change environment_roles role column from string to
enum type.
Fix tests and functions affected by the column type change.
2020-01-14 13:12:29 -05:00
leigh-mil
812caf5d7d Update schema and create/update Environments domain methods to enforce environment name uniqueness within an application context. 2019-12-18 10:54:17 -05:00
leigh-mil
a4f21dc7e6 Prevent error from being raised when user is not trying to update a
disabled env role

We were only checking to see if a role was disabled or deleted before
raising an error, so I added in a check to see if the user was trying to
update the env role before raising an error. The error should only be
raised if the role is disabled or deleted AND the user is trying to
assign a new role to the env role.

I also added in a disabled property to the EnvironmentRole model to make
things more readable.
2019-11-15 09:51:02 -05:00
leigh-mil
06a36f23bc Raise error when a user attempts to update a disabled env role 2019-11-12 17:02:57 -05:00
leigh-mil
e8f21acf5b PR fixes 2019-11-12 16:59:22 -05:00
leigh-mil
f928b776a6 Properly set deleted data for UpdateMemberForm and display suspended env access text
Styling for env name and role in update app member perms form
2019-11-12 16:54:46 -05:00
leigh-mil
d40c11a8f6 Change how env_roles are updated
This change makes it so that when an env_role is updated to be None, the
role property on the env_role is changed to be None in addition to being
marked as deleted. This also adds in a check so that previously deleted
env_roles cannot be reassigned a role.
2019-11-12 16:54:46 -05:00
richard-dds
184b58d5d2 Remove AWSCloudProvider 2019-10-28 13:55:34 -04:00
richard-dds
1bce0a1f01 Revert user deletion job 2019-10-14 16:51:19 -04:00
richard-dds
0c480ccc41 Fix tests 2019-10-08 16:42:25 -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
richard-dds
6100b6e479 Fix create_environments test 2019-09-11 15:36:07 -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
bc9426015c Add another test for Environments.get_environments_pending_creation 2019-09-11 11:43:10 -04:00
richard-dds
6b7db2ca46 Better ergonomics for creating factory portfolios w/ TOs 2019-09-11 11:43:06 -04:00
richard-dds
f6cb6f2a31 Change Environment.creator relation from ApplicationRole to User 2019-09-11 11:42:59 -04:00
richard-dds
c00f13de2c Add query for getting environments pending baseline creation 2019-09-11 11:41:10 -04:00
richard-dds
13861ad998 Add query for getting environments pending atat user creation 2019-09-11 11:41:10 -04:00
richard-dds
e3ea2d2fe5 Move "envs pending creation" query to Environments domain 2019-09-11 11:41:10 -04:00
tomdds
8d3f488d6d Mark create env test ask skipped 2019-09-03 10:10:11 -04:00
tomdds
1fe9399f99 Update CloudProviderInterface for provision job consumption 2019-08-29 14:06:18 -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
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
546e04555d Update role div height
Move serialization into the route
change member.role to member.role_name in form and route
Return 400 for invalid form submission
2019-05-14 11:00:14 -04:00
leigh-mil
319cc17c1c Start vue component for edit-environment-role 2019-05-14 10:58:22 -04:00
leigh-mil
addf2e97a1 Update form to nest all envs in one form 2019-05-14 10:58:22 -04:00
leigh-mil
060c6834bf Add save button and temp member role toggle to env member form 2019-05-14 10:58:22 -04:00
montana-mil
0c6f00bf4d
Merge pull request #785 from dod-ccpo/check-user-is-in-app-before-adding-env-role
Check user is in app before adding env role
2019-04-30 14:31:08 -04:00
Montana
6822680bc8 Ensure that a member is an application member before adding the user to an environment 2019-04-29 11:06:37 -04:00
George Drummond
079672c818
Update application environments 2019-04-29 10:46:21 -04:00
leigh-mil
73e4057c3d Remove unused imports 2019-04-25 10:47:39 -04:00
leigh-mil
5e415edaef Update form to handle No access 2019-04-25 10:47:39 -04:00
leigh-mil
c085f27af8 Update env roles by environment 2019-04-25 10:47:39 -04:00
dandds
0bde431a70 extend soft delete functionality to app and env roles 2019-04-15 15:58:38 -04:00
dandds
b58aef2c6b domain methods for deleting apps 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
4a0dd2d432 remove unused domain methods and arguments 2019-03-22 06:31:20 -04:00
dandds
d3c3209fc0 cleanup unused portfolio roles 2019-03-15 07:14:49 -04:00
dandds
d3d36822df workspace -> portfolio everywhere 2019-01-14 16:00:17 -05:00
dandds
3fc323d785 project -> application everywhere 2019-01-14 16:00:17 -05:00
Patrick Smith
28e0d423fd Create user account in CSP when adding an environment role 2019-01-08 12:19:51 -05:00
Patrick Smith
334babe5ff Hook into cloud provider when creating an env/app 2019-01-07 17:30:34 -05:00
dandds
a75c19188f display message for successfully updating environment role / access 2018-12-12 11:39:58 -05:00
richard-dds
3765a73dc1 Consolidate WorkspaceUser into WorkspaceRole 2018-11-05 14:20:07 -05:00
richard-dds
c69b7caffc Formatting 2018-10-24 11:17:44 -04:00