| |
@@ -136,10 +136,10 @@
|
| |
return True
|
| |
elif copr.user_id == self.id:
|
| |
return True
|
| |
- if (self.permissions_for_copr(copr) and
|
| |
- self.permissions_for_copr(copr).copr_builder ==
|
| |
- helpers.PermissionEnum("approved")):
|
| |
- return True
|
| |
+ if permissions := self.permissions_for_copr(copr):
|
| |
+ builder, admin = permissions.copr_builder, permissions.copr_admin
|
| |
+ if helpers.PermissionEnum("approved") in (builder, admin):
|
| |
+ return True
|
| |
return False
|
| |
|
| |
@property
|
| |
As discussed in https://github.com/packit/packit-service/issues/1136,
admins of Copr repositories still need to have approved
builder
permissions for submitting Copr builds.
Change the behavior to accept admin privileges too without a need to
explicitly grant the permissions either manually or automatically.
Signed-off-by: Matej Focko mfocko@redhat.com