feature: allow co-maintainers to disown their pkg

Derived off of original work done by Leonidas Spyropoulos
at https://gitlab.archlinux.org/archlinux/aurweb/-/merge_requests/503

This revision of that original work finishes off the inconsistencies
mentioned in the original MR and adds a small bit of testing for more
regression checks.

Fixes: #360

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-08-03 16:50:52 +03:00
parent ab2956eef7
commit 08d485206c
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
5 changed files with 123 additions and 35 deletions

View file

@ -131,7 +131,7 @@
/>
</form>
</li>
{% elif request.user.has_credential(creds.PKGBASE_DISOWN, approved=[pkgbase.Maintainer]) %}
{% elif request.user.has_credential(creds.PKGBASE_DISOWN, approved=[pkgbase.Maintainer] + comaintainers) %}
<li>
<a href="/pkgbase/{{ pkgbase.Name }}/disown?{{ {'next': '/pkgbase/%s' | format(pkgbase.Name)} | urlencode }}">
{{ "Disown Package" | tr }}