Actually return results from is_sidetag()/_owner()

Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
Nils Philippsen 2020-06-16 17:09:10 +02:00 committed by Tomas Kopecek
parent fe596571e6
commit a8c72a7740

View file

@ -34,6 +34,8 @@ def is_sidetag(taginfo, raise_error=False):
if not result and raise_error:
raise koji.GenericError("Not a sidetag: %(name)s" % taginfo)
return result
def is_sidetag_owner(taginfo, user, raise_error=False):
"""Check, that given user is owner of the sidetag"""
@ -42,6 +44,8 @@ def is_sidetag_owner(taginfo, user, raise_error=False):
if not result and raise_error:
raise koji.ActionNotAllowed("This is not your sidetag")
return result
# Policy tests
class SidetagTest(koji.policy.MatchTest):