move permission check out of underlying write_signed_rpm call
This commit is contained in:
parent
27b3340fcb
commit
ba8f5c9587
1 changed files with 6 additions and 2 deletions
|
|
@ -5219,8 +5219,6 @@ def query_rpm_sigs(rpm_id=None, sigkey=None, queryOpts=None):
|
|||
|
||||
def write_signed_rpm(an_rpm, sigkey, force=False):
|
||||
"""Write a signed copy of the rpm"""
|
||||
context.session.assertPerm('sign')
|
||||
#XXX - still not sure if this is the right restriction
|
||||
rinfo = get_rpm(an_rpm, strict=True)
|
||||
if rinfo['external_repo_id']:
|
||||
raise koji.GenericError, "Not an internal rpm: %s (from %s)" \
|
||||
|
|
@ -8324,6 +8322,12 @@ class RootExports(object):
|
|||
queryRPMSigs = staticmethod(query_rpm_sigs)
|
||||
writeSignedRPM = staticmethod(write_signed_rpm)
|
||||
|
||||
def writeSignedRPM(an_rpm, sigkey, force=False):
|
||||
"""Write a signed copy of the rpm"""
|
||||
context.session.assertPerm('sign')
|
||||
#XXX - still not sure if this is the right restriction
|
||||
return write_signed_rpm(an_rpm, sigkey, force)
|
||||
|
||||
def addRPMSig(self, an_rpm, data):
|
||||
"""Store a signature header for an rpm
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue