mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fix: include maint/comaint state in pkgbase post's error context
Closes #386 Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
parent
8a3a7e31ac
commit
b8a4ce4ceb
1 changed files with 4 additions and 3 deletions
|
@ -587,6 +587,9 @@ async def pkgbase_disown_post(
|
||||||
|
|
||||||
context = templates.make_context(request, "Disown Package")
|
context = templates.make_context(request, "Disown Package")
|
||||||
context["pkgbase"] = pkgbase
|
context["pkgbase"] = pkgbase
|
||||||
|
context["is_maint"] = request.user == pkgbase.Maintainer
|
||||||
|
context["is_comaint"] = request.user in comaints
|
||||||
|
|
||||||
if not confirm:
|
if not confirm:
|
||||||
context["errors"] = [
|
context["errors"] = [
|
||||||
(
|
(
|
||||||
|
@ -610,9 +613,7 @@ async def pkgbase_disown_post(
|
||||||
request, "pkgbase/disown.html", context, status_code=HTTPStatus.BAD_REQUEST
|
request, "pkgbase/disown.html", context, status_code=HTTPStatus.BAD_REQUEST
|
||||||
)
|
)
|
||||||
|
|
||||||
if not next:
|
next = next or f"/pkgbase/{name}"
|
||||||
next = f"/pkgbase/{name}"
|
|
||||||
|
|
||||||
return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER)
|
return RedirectResponse(next, status_code=HTTPStatus.SEE_OTHER)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue