Bug 1392064 - Unable to delete group coprs
Summary: Unable to delete group coprs
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Copr
Classification: Community
Component: backend
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-04 17:13 UTC by Sean Myers
Modified: 2019-10-03 07:51 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-03 07:51:04 UTC


Attachments (Terms of Use)

Description Sean Myers 2016-11-04 17:13:44 UTC
Description of problem:

In my copr group[0], I'm not able to delete group projects because I'm not the owner. However, I *am* the owner (and administrator) of the FAS group related to this copr group[1], so I think I should frankly be allowed to do whatever I want to in the pulp copr group's namespace.

[0]: https://copr.fedorainfracloud.org/groups/g/pulp/coprs/
[1]: https://admin.fedoraproject.org/accounts/group/view/pulp

Steps to Reproduce:

I'm not entirely sure. rbarlow is the original owner of the copr group, so that might be confusing things. Here's something that *might* work, and even be testable in isolation, but it might not act

1. Create a copr in a copr group (@group/copr)
2. Have the user that created the copr be removed from that group
3. Try to delete @group/copr as a different user that is an administrator of the copr group

Actual results:
Error: "Only owners may delete their projects."

Expected results:
Success: "You're the group owner, bro, do what you like!"

Additional info:
In addition to no longer being the group owner, or even a member of the group, the rbarlow user is no longer active in FAS:

https://admin.fedoraproject.org/accounts/user/view/rbarlow

So, even though the actual person behind the rbarlow user is totally fine with me deleting those repos, there's nothing he can do to help.

I'm not sure what component is appropriate. This error can be seen in both the frontend and when using the CLI, and I assume the common piece that they both use is the backend, so that's what I went with.

Comment 1 Sean Myers 2016-11-04 17:17:47 UTC
As indicated by the severity, the inability to delete these coprs is not blocking me in any way. However, if a reproducer can be found and captured in a test or it's otherwise not helpful to keep the "offending" coprs around, I'd love to see these coprs be destroyed:

* https://copr.fedorainfracloud.org/coprs/g/pulp/2.9/
* https://copr.fedorainfracloud.org/coprs/g/pulp/2.10-nightly/
* https://copr.fedorainfracloud.org/coprs/g/pulp/rbarlow-2.8-testing/

Also, while I'm pretty sure the rbarlow user owns those coprs, I'm not completely sure, and might be completely wrong about my repro steps.

Comment 2 Randy Barlow 2016-11-04 17:23:23 UTC
I can confirm that I think these coprs should be deleted.

Comment 3 clime 2016-11-04 22:57:59 UTC
Yeah, rbarlow is blocked from doing anything with the coprs by no longer being in the FAS group 'pulp'. At the same time, he is the COPR user that created the projects, which is the requirement for deletion. 

You are right that FAS group administrators should have this permission instead.

I should be able to delete the coprs as COPR (general) admin.

Comment 5 Pavel Raiskup 2019-07-26 09:48:50 UTC
Resolved via: https://pagure.io/copr/copr/issue/779


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