Commit 2a7acb5
authored
XSI-2128: Ignore RBAC when destroying internal tasks (#6885)
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.1 file changed
Lines changed: 1 addition & 1 deletion
| 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