Commit Graph

171 Commits

Author SHA1 Message Date
leigh-mil
63a5d9274b Update route to handle error when env names are duplicated 2019-12-18 10:54:17 -05:00
leigh-mil
b927ef1b0e Create utility function for the pattern of committing to the database or raising AlreadyExistsError 2019-12-16 14:39:32 -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
leigh-mil
78ef47f649 Update TO route helper function to catch error and display flash message when a user tries to save a TO with an existing number.
Update TaskOrderForm so that it converts empty string for number into None, this was causing an issue where new TOs were being saved with an empty string for the number, which violated the unique constraint.
2019-12-13 14:53:58 -05:00
graham-dds
3b265b0eb6 Flash message for insufficient funding 2019-12-10 11:23:53 -05:00
dandds
9ae20b4a2a JSON logging for Celery workers.
This enables JSON logging for Celery workers if the LOG_JSON conig value
is set. It uses the same JsonFormatter class used by the Flask
applications. That class has been updated in two ways:

- It takes a `source` kwarg to define the log source for the formatter.
- The `msg` attribute of the log record is formatted with any arguments
  that may have been passed. This is necessary for Celery to render task
  type, completion time, etc. into the log output.
2019-11-25 10:13:37 -05:00
dandds
e56e0d8619 Log DOD ID for user when available. 2019-11-25 09:47:01 -05:00
leigh-mil
4cba564c97 Catch CSP exceptions and display a flash message with the error 2019-11-22 08:49:16 -05:00
richard-dds
e3c9105270 Fix some LGTM errors 2019-10-31 13:46:04 -04:00
leigh-mil
1eecf19459 Update flash message for resending an invite 2019-10-15 14:35:13 -04:00
graham-dds
8e6a4101ff Update copy in headers / flash 2019-10-14 14:46:00 -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
richard-dds
78c4949776 Move sqlalchemy_dumps to atst.utils.json 2019-10-08 16:42:25 -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
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
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
a03ff56017 Invites are revokable if they are not expired, and add success flash message 2019-09-26 09:46:24 -04:00
graham-dds
83479f60af Flash messages for saving/ submitting applications 2019-09-24 10:16:39 -04:00
dandds
7bb9400ea7 Update the flash message for when a new application member is added. 2019-09-19 09:34:00 -04:00
leigh-mil
93530e903f Create route for updating app member 2019-09-18 11:16:54 -04:00
dandds
d7478e322a Use Celery instead of RQ.
Celery provides a more robust set of queueing options for both tasks and
worker processes. Updates include:
- infrastructure necessary to run Celery, including celery entrypoint
- backgrounded functions are now imported directly from atst.jobs
- update tests as-needed
- update kubernetes worker pod command
2019-08-29 09:33:47 -04:00
leigh-mil
e35399d8f5 Update route function to revoke CCPO superuser status 2019-08-13 10:32:26 -04:00
leigh-mil
fa83dfe6bd When user not found, redirect to users page and show flash message 2019-08-09 11:08:23 -04:00
leigh-mil
811a498bf4 Finish route for confirming CCPO user, add function to update user's ccpo perms, and add success flash message to template 2019-08-09 10:50:34 -04:00
leigh-mil
8420a78392 Add CREATE_CCPO_USER permission, create context processor for ATAT so user_can and permissions can be used in the template, add placeholder button for adding new CCPO user 2019-08-09 10:50:34 -04:00
George Drummond
9f274a7d1c Script to find unused translations 2019-06-14 09:59:07 -04:00
George Drummond
1821e164b0 Merge pull request #908 from dod-ccpo/clean-up-flash-messages
Delete unused flash messages
2019-06-13 10:34:53 -04:00
George Drummond
3740291662 Delete unused flash messages 2019-06-13 10:11:29 -04:00
dandds
4ba983cbdd Remove unused template filters 2019-06-13 09:51:00 -04:00
dandds
717e996685 Remove unused utilities 2019-06-12 14:54:01 -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
George Drummond
c08f14382f Add in success flash message 2019-06-11 11:30:37 -04:00
Montana
99ab0c22bc Add Success banner on submit 2019-06-11 09:31:08 -04:00
richard-dds
48d4b466b1 Formatting 2019-06-10 15:16:26 -04:00
richard-dds
a2d201e43b Use UTC tz for determining TO status 2019-06-10 15:16:26 -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
d7d239d406 Alphabetize flash messages 2019-06-05 12:58:33 -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
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
richard-dds
5dcbee333a Make session limiter configurable 2019-05-28 10:45:12 -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
richard-dds
32df561c6d Merge pull request #827 from dod-ccpo/stig-notifications
Create Notification System
2019-05-20 09:51:09 -04:00
dandds
01a935f257 Merge pull request #822 from dod-ccpo/app-members-edit
App members edit
2019-05-17 14:08:06 -04:00
dandds
0dc0397702 Update user's environment role on the team page.
- Includes adjustments to the applications.update_team route
- Adds hidden environment ID to the HTML form
2019-05-17 14:00:45 -04:00
George Drummond
15d4b48184 Looking up g.portfolio when g.current_user is None raises an error 2019-05-17 13:29:40 -04:00
richard-dds
d8e75668b0 Log notifications at the time of sending 2019-05-15 14:57:46 -04:00
richard-dds
9ba1def91c Use separate queue method for notifications 2019-05-15 14:57:46 -04:00
richard-dds
97b9d84c38 Select only recipient emails from the db 2019-05-15 14:57:46 -04:00