fix: allow co-maintainers to [un]pin comments on a package

Closes #279

Signed-off-by: Kevin Morris <kevr@0cost.org>
This commit is contained in:
Kevin Morris 2022-02-11 15:57:52 -08:00
parent 35e7486ea3
commit 708ade4dbf
No known key found for this signature in database
GPG key ID: F7E46DED420788F3
6 changed files with 47 additions and 8 deletions

View file

@ -318,7 +318,7 @@ async def pkgbase_comment_pin(request: Request, name: str, id: int,
comment = get_pkgbase_comment(pkgbase, id)
has_cred = request.user.has_credential(creds.COMMENT_PIN,
approved=[pkgbase.Maintainer])
approved=comment.maintainers())
if not has_cred:
_ = l10n.get_translator_for_request(request)
raise HTTPException(
@ -353,7 +353,7 @@ async def pkgbase_comment_unpin(request: Request, name: str, id: int,
comment = get_pkgbase_comment(pkgbase, id)
has_cred = request.user.has_credential(creds.COMMENT_PIN,
approved=[pkgbase.Maintainer])
approved=comment.maintainers())
if not has_cred:
_ = l10n.get_translator_for_request(request)
raise HTTPException(