Commit Graph

143 Commits

Author SHA1 Message Date
leigh-mil
ff0abe7dce Merge branch 'staging' into remove-delete-functionality 2019-12-18 15:20:41 -05:00
leigh-mil
5b55b5800e Remove route, tests, and template code for deleting an application 2019-12-18 12:18:43 -05:00
leigh-mil
d300ccf31b Catch error on update applications route when app name is duplicated within a portfolio 2019-12-18 10:54:18 -05:00
leigh-mil
63a5d9274b Update route to handle error when env names are duplicated 2019-12-18 10:54:17 -05:00
leigh-mil
ffbf612290 Update route to catch error when app name uniqueness is violated and display a error message 2019-12-16 14:39:32 -05:00
dandds
8f94d9e6ec Log any CSP errors that occur when disabling a user.
When one user disables another's environment role in Azure, sometimes an
exception will be raised. Since we catch the exception and display an
error message to the user, we should also log the exception so that the
error is traceable later.
2019-12-13 11:41:18 -05:00
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
25a5cb136c Merge pull request #1196 from dod-ccpo/revoke-env-access
Catch CSP exceptions and display a flash message with the error
2019-11-22 14:46:34 -05:00
leigh-mil
4cba564c97 Catch CSP exceptions and display a flash message with the error 2019-11-22 08:49:16 -05:00
leigh-mil
8aa302357b Move label display logic into the Label macro 2019-11-20 12:09:46 -05:00
leigh-mil
58a0b2dd9d Move display status logic to be a property of an ApplicationRole 2019-11-20 12:08:41 -05:00
leigh-mil
9f90f5abbd Update app member status labels to accurately reflect member's current status 2019-11-20 11:59:48 -05:00
leigh-mil
7c8717c2fe Add tests for the applications.new routes for adding a new member and updating a member
Add tests for creating and updating app member helper methods
2019-11-18 14:09:52 -05:00
leigh-mil
f9fd9cac13 When editing member perms through the new app form, return to new app form step 3 after update member form is submitted 2019-11-15 17:37:32 -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
3a1a996469 Create macro for environment role field and update route so the correct data is passed to Environments.update_env_role to update or delete roles 2019-11-12 16:54:46 -05:00
leigh-mil
d324ec57ec Add field for deleted in the app members environment form 2019-11-12 16:54:46 -05:00
graham-dds
a8d5201cc6 Standardize member and env name ordering 2019-11-08 15:06:25 -05:00
graham-dds
f705ac2303 Ensure env roles are sorted for each member 2019-11-07 09:36:45 -05:00
graham-dds
6bc1e0ba9a Ensure environment names are sorted when rendered 2019-11-06 11:53:31 -05:00
richard-dds
e3c9105270 Fix some LGTM errors 2019-10-31 13:46:04 -04:00
graham-dds
24be9a6a61 Update copy for new app provisioning
- change flashed message for adding members
- use the correct helper text for the app name input
- a few other updates to text in translations
2019-10-14 10:10:22 -04:00
leigh-mil
13bc830536 Add update invite form to settings page and move user info page of member form into its own macro 2019-10-08 16:10:46 -04:00
leigh-mil
4d043363a7 Create route for resending an app invite
Replace ApplicationInvitations._update_status() with revoke() because multiple functions used _update_status() and it was causing app roles to be disabled when they shouldn't have. Now app roles are disabled within the revoke function.
Updated Invitations.resend() to accept user details so the invite info
can be changed in the new invite
2019-10-08 15:59:16 -04:00
graham-dds
f57ee99328 New app step 2 template rendering: specify kwargs 2019-10-08 13:15:28 -04:00
graham-dds
4a4e20534f Flashed message after step 1 of app provisioning
- add flash for updating application
- add to route logic
2019-10-08 13:15:28 -04:00
graham-dds
2d28356cdc Refactor routes 2019-10-08 13:15:28 -04:00
graham-dds
d4b5e484ee rearrange templates to follow new dir structure 2019-10-01 16:09:51 -04:00
graham-dds
d4bc051eb4 Use correct flash for step 2 2019-10-01 15:56:18 -04:00
graham-dds
8df0bfedde Add app to render_args of render_template helper 2019-10-01 15:56:18 -04:00
graham-dds
98b950dfa3 don't use render template helper function for envs 2019-10-01 15:56:18 -04:00
graham-dds
dfcdee3910 Add step 3 POST route for app member creation 2019-10-01 15:56:14 -04:00
graham-dds
0ed782f4e8 Move app member creation business logic from route 2019-10-01 09:16:36 -04:00
graham-dds
4aa0afdb67 New env role logic in filter_env_roles_form_data 2019-09-30 15:41:00 -04:00
graham-dds
fb58bc1ba1 Add GET route for step 3 2019-09-30 15:41:00 -04:00
leigh-mil
05aca75679 Fix typo and add flash message for when invite can't be revoked 2019-09-26 09:53:20 -04:00
leigh-mil
663fb9f288 Use ApplicationRoles.disable() instead of Applications.remove_member() 2019-09-26 09:53:20 -04:00
leigh-mil
a03ff56017 Invites are revokable if they are not expired, and add success flash message 2019-09-26 09:46:24 -04:00
leigh-mil
5c54c043c0 Add route for applications.revoke_invite 2019-09-26 09:46:23 -04:00
dandds
4f8cbc2b68 Delete unused Jinja macros and rearrange templates.
Templates and fragments that relate to specific resources (portfolios,
applications, task orders) should reside in directories named for the
relevant resource. This also matches the way the application routes are
distributed among modules named for each resource type.
2019-09-25 11:19:56 -04:00
graham-dds
66f606d951 add permissions to new application routes 2019-09-24 10:16:49 -04:00
graham-dds
8914419dac Break new application route into multiple routes 2019-09-24 10:16:48 -04:00
graham-dds
cd37e18178 Rename application-related forms 2019-09-24 10:16:48 -04:00
dandds
2ba8c1b0cb Merge pull request #1078 from dod-ccpo/env-beat-schedule
Add a beat processing schedule for environment provisioning jobs.
2019-09-19 10:55:33 -04:00
dandds
7bb9400ea7 Update the flash message for when a new application member is added. 2019-09-19 09:34:00 -04:00
dandds
82c34ee9b1 Display real environment processing status. 2019-09-18 16:34:56 -04:00
leigh-mil
b7b625750f Use data property of PermissionsForm to return the form data is the correct format 2019-09-18 11:16:55 -04:00