Actually return results from is_sidetag()/_owner()
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
fe596571e6
commit
a8c72a7740
1 changed files with 4 additions and 0 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue