Bug 1314918

Summary: Invalid edit of Package Git/SCM URL in group-owned copr causes error 404
Product: [Community] Copr Reporter: Daniel Vrátil <me>
Component: frontendAssignee: Jakub Kadlčík <jkadlcik>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: jkadlcik
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: 2016-03-29 12:18:25 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:

Description Daniel Vrátil 2016-03-04 21:19:25 UTC
Description of problem:
When I set an invalid URL in Git/Tito or Mock SCM "Git URL" field and hit save I get following error:

Error 404: Not Found
Project dvratil/plasma-5-unstable does not exist.

The bug here is that the Copr is actually @kdesig/plasma-5-unstable, not dvratil/plasma-5-unstable (indeed there is no such Copr). Looks like the error handling code always assumes current user owns the Copr, regardless of the Copr being group-owned or not.

How reproducible:
always

Steps to Reproduce:
1. have a group-owned Copr
2. edit a Package, set invalid value in Git/Tito or Mock SCM "Git URL" field
3. click "Save"

Actual results:
Error 404 "$yourFASName/$coprName does not exist"


Expected results:
Page reloads with proper "Invalid value" warnings, same as on a user-owned Coprs


Additional info:

Comment 1 Jakub Kadlčík 2016-03-07 16:19:58 UTC
Hello Daniel, thank you for the feedback.

Modified in: 1314918

Comment 2 Jakub Kadlčík 2016-03-15 08:51:38 UTC
Code with this fix is currently deployed on testing server.
You can test it before it will be deployed to production.
Please see: http://copr-fe-dev.cloud.fedoraproject.org

Comment 3 Jakub Kadlčík 2016-03-29 12:18:25 UTC
Copr production machines were upgraded to version containing a fix to this issue.
If you are not satisfied with provided solution, please feel free to reopen this.