only list iscsi when enabled (content == images)

This commit is contained in:
Dietmar Maurer
2012-02-15 09:33:12 +01:00
parent 31a49afc09
commit 0c1473f928
3 changed files with 8 additions and 1 deletions

View File

@ -76,6 +76,7 @@ __PACKAGE__->register_method ({
my $res = {};
my @sids = PVE::Storage::storage_ids($cfg);
foreach my $storeid (@sids) {
next if !$info->{$storeid};
my $privs = [ 'Datastore.Audit', 'Datastore.AllocateSpace' ];
next if !$rpcenv->check_any($authuser, "/storage/$storeid", $privs, 1);
next if $param->{storage} && $param->{storage} ne $storeid;