Some permission fixes fro vm.*().

This commit is contained in:
Julien Fontanet 2016-02-22 19:23:32 +01:00
parent b87acb47e2
commit cee05fea7c

View File

@ -673,6 +673,8 @@ exports.rollingSnapshot = rollingSnapshot
backup = $coroutine ({vm, remoteId, file, compress, onlyMetadata}) ->
yield @backupVm({vm, remoteId, file, compress, onlyMetadata})
backup.permission = 'admin'
backup.params = {
id: {type: 'string'}
remoteId: { type: 'string' }
@ -723,6 +725,8 @@ rollingBackup = $coroutine ({vm, remoteId, tag, depth, compress, onlyMetadata})
onlyMetadata
})
rollingBackup.permission = 'admin'
rollingBackup.params = {
id: { type: 'string' }
remoteId: { type: 'string' }
@ -945,6 +949,8 @@ import_ = $coroutine ({host, sr}) ->
sr = xapi.pool.$default_SR
if not sr
throw new InvalidParameters('there is not default SR in this pool')
# FIXME: must have administrate permission on default SR.
else
xapi = @getXapi(sr)