16 Commits

Author SHA1 Message Date
leigh-mil
d3f757c649 Update test_for_user to make variables clearer and add in a test case that should not be included in the list returned.
Use list comprehension in portfolio_applications route to get list of all environments for a user
2019-12-11 10:35:42 -05:00
leigh-mil
02efa33e49 Display users env role if they have environment access 2019-12-11 10:07:09 -05:00
leigh-mil
8330b4de24 Check to see if the env_role has been provisioned before disabling env_role in the csp 2019-12-06 09:59:56 -05:00
leigh-mil
c501431719 Check to see if the environment has been provisioned before disabling the env role in the csp 2019-12-06 09:53:36 -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
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
leigh-mil
54f3c2f8ba Update text and icon in modal
Update env_role status when it is deleted
2019-11-12 16:54:46 -05:00
richard-dds
d1e6533824 Implement EnvironmentRoles.disable 2019-10-29 15:57:57 -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
8add5b4e22 Filter deleted environment roles from top-level domain method. 2019-05-21 14:08:14 -04:00
dandds
0da0f6a0ae WIP: use team form for application team page 2019-05-06 15:15:03 -04:00
dandds
849c5d4b58 Rearrange and rename application routes.
- move application routes to their own Flask blueprint
- squash application routes to be resource-specific
- reorganize application routes
2019-04-22 07:19:30 -04:00
dandds
c1df245800 Scope access to applications, task orders, and environment roles.
These resources should be scoped to the portfolio when accessed from
route functions.
2019-04-16 14:18:53 -04:00