Bug 1014944

Summary: Project Version with null projectType should disallow PO upload
Product: [Retired] Zanata Reporter: Sean Flanigan <sflaniga>
Component: Component-Logic, Component-UIAssignee: Sean Flanigan <sflaniga>
Status: CLOSED UPSTREAM QA Contact: Zanata-QA Mailling List <zanata-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: developmentCC: dchen, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-29 03:34:14 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1030166    

Description Sean Flanigan 2013-10-03 07:26:21 UTC
Description of problem:
  Project Version with null projectType allows PO upload/download, which it shouldn't.

Version-Release number of selected component (if applicable):
3.1-SNAPSHOT (20131003-1234)

How reproducible:
100% (except the 500 error)

Steps to Reproduce:
1. Define a project with a non-null projectType
2. Define a project version with a null projectType
3. Upload a source document
4. Attempt to download an "offline PO" via the documents page for a locale.
5. Attempt to upload a PO file via the documents page for a locale.
6. Attempt to download an "offline PO" via the editor.
7. Attempt to upload a PO file via the editor.

Actual results:
At step 4, the ".po" link is disabled (as it should be), but at steps 5, 6, and 7 the action is allowed.  In some cases, the upload can lead to a 500 server error (unable to reproduce).

Expected results:
Steps 4, 5, 6 and 7 should be prevented (UI elements should be disabled), and the server should also have its own checks in case of rogue/buggy clients.

Additional info:
Where possible, we must check for null project version type both in the UI and in the corresponding REST services, both for upload and download.

Comment 1 Ding-Yi Chen 2013-11-14 04:40:30 UTC
Bug 1030166 helps to prevent this on new projects.

However, this bug is required for existing project.

Comment 2 Zanata Migrator 2015-07-29 03:34:14 UTC
Migrated; check JIRA for bug status: http://zanata.atlassian.net/browse/ZNTA-326