add is_sidetag policy test
This commit is contained in:
parent
4b5a16008d
commit
39d45e550f
1 changed files with 10 additions and 1 deletions
|
|
@ -28,7 +28,16 @@ CONFIG_FILE = "/etc/koji-hub/plugins/sidetag.conf"
|
|||
CONFIG = None
|
||||
|
||||
|
||||
class SidetagOwner(koji.policy.MatchTest):
|
||||
class SidetagTest(koji.policy.MatchTest):
|
||||
"""Checks, if tag is a sidetag"""
|
||||
name = 'is_sidetag'
|
||||
|
||||
def run(self, data):
|
||||
tag = get_tag(data['tag'])
|
||||
return bool(tag['extra'].get('sidetag'))
|
||||
|
||||
|
||||
class SidetagOwnerTest(koji.policy.MatchTest):
|
||||
"""Checks, if user is a real owner of sidetag"""
|
||||
name = 'is_sidetag_owner'
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue