Commit 57adc22
Bengang Yuan
XSI-2128: Ignore RBAC when destroying internal tasks
When calling `VDI.copy` or `VDI.pool_migrate` with `vm_power_admin` role,
xapi may forward the operation to a remote host. In this case, xapi creates
a pool session on the remote host and create a new task. When the
operation completes, `try_internal_async` uses the user's session to
destroy the task that was created by an internal pool session, but the
user doesn't have the permission to destory other user's task
(task.destroy/any), so it fails.
Solution:
This is an internal cleanup operation, so it doesn't need user RBAC
restriction and checking. Ignore RBAC when destroying internal tasks by
calling Db_actions.DB_Action.Task.destroy directly.
Signed-off-by: Bengang Yuan <bengang.yuan@citrix.com>1 parent ba43e00 commit 57adc22
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2025 | 2025 | | |
2026 | 2026 | | |
2027 | 2027 | | |
2028 | | - | |
| 2028 | + | |
2029 | 2029 | | |
2030 | 2030 | | |
2031 | 2031 | | |
| |||
0 commit comments