Commit Graph

2270 Commits

Author SHA1 Message Date
leigh-mil
0cbd971c11 Merge pull request #1032 from dod-ccpo/dont-include-last-login-update-in-auditlog
Do not create AuditEvent if updating the User.last_login
2019-08-19 11:26:36 -04:00
leigh-mil
2776926dea Move custom audit log logic into the User class 2019-08-19 10:25:26 -04:00
leigh-mil
1efe9cb5e4 Merge pull request #1023 from dod-ccpo/csp-links
Env roles bug fix
2019-08-19 09:43:54 -04:00
leigh-mil
0d6f7aa3cc Do not create AuditEvent if updating the User.last_login 2019-08-16 16:41:58 -04:00
dandds
24b2d95f03 Application members should not see deleted applications.
This updates the `Portfolios.for_user` method to screen out deleted
ApplicationRole entities. For extra assurance, we also mark application
roles as disabled when they are deleted.
2019-08-15 10:20:30 -04:00
leigh-mil
c37c5d72b9 move data property into the base EnvironmentForm so that NO_ACCESS is converted to None when creating a new application member 2019-08-15 10:13:34 -04:00
dandds
16c9b826b3 Merge pull request #1019 from dod-ccpo/upload-error-handling
Add validations and error states for TO upload form
2019-08-14 14:30:46 -04:00
richard-dds
56cec0694f Formatting 2019-08-14 11:40:23 -04:00
richard-dds
a7417b4f39 Add upload errors to translations file 2019-08-14 11:35:07 -04:00
leigh-mil
e59e3b959c Add listener to User model to record permission set updates and update user audit log template 2019-08-13 16:36:38 -04:00
leigh-mil
b26d8d575c Merge pull request #1011 from dod-ccpo/remove-ccpo-user
Remove CCPO user
2019-08-13 16:29:07 -04:00
leigh-mil
852046a3e7 Change variable name from data to user_info because it was more descriptive 2019-08-13 16:23:11 -04:00
leigh-mil
87b173b035 Use tuple instead of a dict for the user data and form 2019-08-13 14:09:53 -04:00
richard-dds
6652d47104 Add custom message for object_name length validation 2019-08-13 13:58:36 -04:00
richard-dds
bc0fd4900a Prevent "there were some errors" from being flashed twice 2019-08-13 10:51:09 -04:00
richard-dds
71bb1be130 Validate filename and object_name for TO PDF upload 2019-08-13 10:51:09 -04:00
leigh-mil
7c65783d08 Add csrf token to remove ccpo user form 2019-08-13 10:32:26 -04:00
leigh-mil
e35399d8f5 Update route function to revoke CCPO superuser status 2019-08-13 10:32:26 -04:00
leigh-mil
54239a520e Add revoke access button and modal, sketch out route function for removing cppo perms from a user 2019-08-13 10:17:24 -04:00
tomdds
0410d82359 Merge pull request #1018 from dod-ccpo/new-user-dev
Allow creation of new users in dev mode
2019-08-13 10:13:56 -04:00
tomdds
59f43c69ee Only populate passed info when creating new user 2019-08-12 10:14:49 -04:00
tomdds
f6447d49e0 Allow creation of new users in dev mode 2019-08-09 16:01:32 -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
1783cd494d Add max length to dod id field in CCPO user form 2019-08-09 11:08:23 -04:00
leigh-mil
864e11ea11 Remove redundant 'ccpo' from ccpo route function names 2019-08-09 11:08:23 -04:00
leigh-mil
feb24b8e16 Break class method for ccpo perms into two methods instead of switching on a kwarg to determine if perms are given or removed 2019-08-09 11:08:23 -04:00
leigh-mil
0b2c7f5957 Remove unused imports and context processor 2019-08-09 11:08:23 -04:00
leigh-mil
1f8337485f Move ccpo routes into their own file 2019-08-09 11:08:22 -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
01ba73ef42 Add in templates for ccpo user form and sketch out route functions 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
dandds
93c39fd7e7 Merge pull request #1012 from dod-ccpo/upload-config
Apply config changes for CSP file uploads.
2019-08-09 10:29:41 -04:00
richard-dds
8fce880ae6 Merge pull request #1013 from dod-ccpo/fix-cancel-button
Update TO form cancel button behavior
2019-08-09 09:50:38 -04:00
dandds
485f578c78 Apply config changes for CSP file uploads.
This applies configuration changes for the Flask app and adds changes to
the Dockerfile so that the build can make a CSP-specific JS bundle. It
adds `write_dotenv` script that creates the appropriate `.env` file for
the `parcel` bundler depending on how the `CSP` environment variable is
set.

- Configure K8s environment variables for Flask CSP usage
- Supply default CSP config setting to Flask app
- Declare the CSP arg in the Dockerfile
- Supply extra Docker build args to CD
- Fix top-level reference to boto3 in file_upload module
- Add back missing sample NGINX config for docker-compose build
2019-08-09 08:05:20 -04:00
richard-dds
3b9a737675 Remove redundant task_order_id check 2019-08-08 16:34:27 -04:00
richard-dds
89dc8d2652 No need to check for presence of TO before deleting 2019-08-08 16:11:13 -04:00
richard-dds
7fdb27ddbf Delete TO draft when click "delete it" on cancel modal 2019-08-08 16:03:47 -04:00
richard-dds
02900ff771 Allow TOs to be deleted, along with their associated CLINs 2019-08-08 16:03:42 -04:00
dandds
9fc6514d80 Clean up defunct upload and CRL logic.
- Applies our previous CSP namespacing pattern to the upload classes.
- Removes code and config for previous uploader implementation.
- Removes Attachment model's ability to upload files directly and
  adjusts tests that expected that behavior.
2019-08-08 13:20:27 -04:00
richard-dds
736e2aa21d Merge pull request #994 from dod-ccpo/cloud-pdf-uploads
CSP PDF uploads
2019-08-08 11:17:07 -04:00
richard-dds
0aaa3d542e Formatting 2019-08-06 17:17:38 -04:00
richard-dds
f1560d5d7f Import CSP deps in uploader implementations 2019-08-06 16:58:57 -04:00
richard-dds
86c1dfb749 Enforce PDF in TO uploader file picker 2019-08-06 16:49:19 -04:00
richard-dds
59de01031c More secure SAS permissions for Azure upload 2019-08-06 13:53:52 -04:00
dandds
326f8c3e03 Merge pull request #998 from dod-ccpo/k8s-crls
K8s crls
2019-08-06 13:31:37 -04:00
dandds
0468d5353a Fix a few bugs in CRL handling.
- Don't write a CRL to the cache if the response code is above 399. (We
  were getting HTML files as CRLs, d'oh).
- Fix a kwarg in the CRL logger (extras -> extra).
- Set Kubernetes clusters to log output as JSON.
2019-08-06 13:21:36 -04:00
leigh-mil
86b66e5685 Merge pull request #999 from dod-ccpo/ccpo-user-list
Page for CCPO users list
2019-08-06 13:18:57 -04:00
dandds
44141c002d Fix up sync-crls script and add to Dockerfile.
- Fix some python formatting and import issues
- Fix dockerfile to include sync-crls script
- Adjust sync-crls script to use paths and CLI tools available in the
  Docker container
2019-08-06 11:31:19 -04:00
dandds
b1cf89051a Add kubernetes config and scripts for syncing CRLs.
This adds a previous version of the CRL sync functionality back to the
repo, with some small adjustments. We now grab the CRLs directly from
their DISA URLs.

The CRL sync is handled by a kubernetes cronjob that sync the files to a
persistent volume that is mounted into each Flask app container.
2019-08-06 11:05:18 -04:00
richard-dds
989e28e5fb Destructure get_token() result 2019-08-06 10:41:17 -04:00