Bug 1314918 - Invalid edit of Package Git/SCM URL in group-owned copr causes error 404
Summary: Invalid edit of Package Git/SCM URL in group-owned copr causes error 404
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: frontend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Kadlčík
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-04 21:19 UTC by Daniel Vrátil
Modified: 2016-03-29 12:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-03-29 12:18:25 UTC


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.