]> git.proxmox.com Git - pve-manager.git/blobdiff - PVE/API2/Cluster.pm
api/tasks: attribute token tasks to user
[pve-manager.git] / PVE / API2 / Cluster.pm
index 8c8060b3b6c1652c94483d78a557b76e91cfc4e6..c802d4402b4c8e86750d413a2ea5b107039bf6f1 100644 (file)
@@ -461,6 +461,9 @@ __PACKAGE__->register_method({
        my $all = $rpcenv->check($authuser, "/", [ 'Sys.Audit' ], 1);
 
        foreach my $task (@$tlist) {
+           if (PVE::AccessControl::pve_verify_tokenid($task->{user}, 1)) {
+               ($task->{user}, $task->{tokenid}) = PVE::AccessControl::split_tokenid($task->{user});
+           }
            push @$res, $task if $all || ($task->{user} eq $authuser);
        }