Allow admins to operate on all sidetags
Fixes: #2321 Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
a8c72a7740
commit
cad3e63ee5
1 changed files with 2 additions and 1 deletions
|
|
@ -40,7 +40,8 @@ def is_sidetag(taginfo, raise_error=False):
|
|||
def is_sidetag_owner(taginfo, user, raise_error=False):
|
||||
"""Check, that given user is owner of the sidetag"""
|
||||
result = (taginfo['extra'].get('sidetag') and
|
||||
taginfo['extra'].get('sidetag_user_id') == user['id'])
|
||||
(taginfo['extra'].get('sidetag_user_id') == user['id'] or
|
||||
context.session.hasPerm('admin'))))
|
||||
if not result and raise_error:
|
||||
raise koji.ActionNotAllowed("This is not your sidetag")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue