Commit Graph

591 Commits

Author SHA1 Message Date
richard-dds
3ab528f192 Raise instead of returning None 2018-08-30 16:31:08 -04:00
richard-dds
a2d4602f0c Remove unused route 2018-08-30 16:31:08 -04:00
Devon Mackay
8af2f5b99e Add ability to override any config setting via ENV var 2018-08-30 16:22:55 -04:00
Patrick Smith
622d28dd8b Remove unused imports 2018-08-30 15:02:02 -04:00
Patrick Smith
457f8de608 Remove now unnecessary auth check 2018-08-30 14:45:39 -04:00
Patrick Smith
27b85ce560 Catch DataError when querying for request
A `DataError` can be raised if we try to find a request with an id that
is not a valid UUID.
2018-08-30 14:45:39 -04:00
Patrick Smith
7040157f25 Formatting fixes 2018-08-30 14:45:39 -04:00
Patrick Smith
d785f19b5b Enforce authorization when getting a request 2018-08-30 14:45:39 -04:00
Patrick Smith
e7aed35054 Link to pending request page from index 2018-08-30 14:45:39 -04:00
Patrick Smith
0906134f56 Move data variables to context for easier re-use 2018-08-30 14:31:12 -04:00
Patrick Smith
4d6f51ed7f Add route for read-only view of request 2018-08-30 14:31:12 -04:00
dandds
0a36f1d6ca move request review information into a partial 2018-08-30 13:25:21 -04:00
Patrick Smith
501caf767b Upload with a temp file instead of streaming
Using a stream is a no-go due to a bug in libcloud: https://issues.apache.org/jira/browse/LIBCLOUD-935?focusedCommentId=16152982&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16152982

Instead, write the uploaded file to a named tempfile and pass that to
the uploader.
2018-08-29 10:40:04 -04:00
Patrick Smith
4e16346ed4 Don't verify hash of uploaded files
I believe this is a bug in `libcloud`. We're passing an iterator (as
required by libcloud --
https://github.com/apache/libcloud/blob/trunk/libcloud/storage/base.py#L592)
for the stream, but when verifying the hash of the uploaded file,
  `libcloud` goes through the stream twice: https://github.com/apache/libcloud/blob/trunk/libcloud/storage/base.py#L614-L621

After the sending the file stream as an upload, when generating the
hash, the iterator has already been iterated through so the second
go-through returns an empty iterator. Thus, the hash will never match
unless an empty file is uploaded.

This change reaches into the container's driver so that we can pass the
`verify_hash` kwarg, which cannot be specified on the container's
methods.
2018-08-28 20:35:31 -04:00
montana-mil
06968940b8 Merge pull request #218 from dod-ccpo/no-projects
Empty states and some permissions
2018-08-28 13:46:54 -04:00
dandds
792114b063 Merge pull request #219 from dod-ccpo/pdf-uploads-#159940565
Pdf uploads
2018-08-28 13:26:01 -04:00
Andrew Croce
7509ee9cfc formatting magic 2018-08-28 13:00:00 -04:00
Andrew Croce
6317580350 False not false 2018-08-28 13:00:00 -04:00
Andrew Croce
610a7898bb create a user_can method in template context, to check against user permissions
add user permissions list to template context
2018-08-28 12:59:54 -04:00
dandds
2bfdf33ac3 rename JSON filter for PDF file upload 2018-08-28 11:22:16 -04:00
Patrick Smith
6d04702dad Handle unauthorized error in workspace context
Previously, an `UnauthorizedError` raised when attempting to view an
workspace that you are not authorized for would show an error instead of
the "not found" page since a second `UnauthorizedError` would be raised
evaluating the context for the "not found" page.
2018-08-28 09:33:18 -04:00
richard-dds
e32926d6ce Formatting 2018-08-27 16:08:31 -04:00
richard-dds
6a681fc54a New view for creating a new workspace member 2018-08-27 16:08:31 -04:00
richard-dds
273d16bf4f Build backend form for creating a new workspace member 2018-08-27 16:08:31 -04:00
Montana
cb2569c504 Form is invalid if no file is uploaded 2018-08-27 14:55:42 -04:00
Montana
be080ed205 Add new filter for rendering FileStorage name in case of invalid financial form submission 2018-08-27 14:22:44 -04:00
Montana
cfe9b7589e Formatting 2018-08-27 13:08:02 -04:00
dandds
900bb7b7ad working PDF uploads for task orders 2018-08-27 13:07:07 -04:00
dandds
54d1e7235b add attachment model and task order relation to it 2018-08-27 13:04:41 -04:00
dandds
ef2e97713a initial uploader and some form work 2018-08-27 13:04:41 -04:00
dandds
43f1866783 record invalid task order number on the request body 2018-08-27 09:29:40 -04:00
richard-dds
7ecc836033 Merge pull request #213 from dod-ccpo/fix-new-workspace-redirect
Redirect to projects/new after FV-related request approval
2018-08-24 16:09:06 -04:00
richard-dds
4cb2447edb Simplify ListItemsUnique check 2018-08-24 15:26:55 -04:00
richard-dds
66877b46bd Ensure that project environment names are unique 2018-08-24 13:53:25 -04:00
richard-dds
da5dbc5bdd Redirect to new project form after FV approval 2018-08-24 13:53:25 -04:00
richard-dds
27601300aa Simplify BA code valdiation 2018-08-24 12:01:34 -04:00
richard-dds
52f577aea6 Merge pull request #208 from dod-ccpo/formatting
Python formatting
2018-08-24 10:35:25 -04:00
richard-dds
b34fb66695 Extract a variable to avoid some strange formatting 2018-08-24 10:16:33 -04:00
richard-dds
da971fe868 Invalid project form submission should still route to projects/new 2018-08-23 16:47:42 -04:00
richard-dds
daa8634cb4 Format project 2018-08-23 16:25:36 -04:00
richard-dds
8806705bc3 Merge pull request #206 from dod-ccpo/multiple-environments
Allow a user to add multiple environments when creating a project
2018-08-23 16:15:00 -04:00
richard-dds
8c0bd133ce Merge pull request #207 from dod-ccpo/fix-poc-form-email
Pull workspace owner information from Information About You Step
2018-08-23 15:02:13 -04:00
richard-dds
e97fbde054 Attempt to pull workspace owner details from form 2018-08-23 14:18:19 -04:00
richard-dds
8d6c64f990 Remove unused import 2018-08-23 12:03:46 -04:00
dandds
f32a3eb90d move task order concerns into that domain class 2018-08-23 10:26:43 -04:00
dandds
8aa6185c91 don't need to explicitly add the task order when saving the related request 2018-08-23 10:15:19 -04:00
dandds
e30d4e238c expect CLIN data with no commas from the financial verification form 2018-08-23 10:11:00 -04:00
dandds
40320baf10 fix requests methods after rebase 2018-08-23 09:28:08 -04:00
dandds
5850002d2a remove mutable default argument 2018-08-23 09:18:25 -04:00
dandds
db2abac340 add TODO 2018-08-23 09:18:25 -04:00