andrijapanicsb opened a new issue #635:
URL: https://github.com/apache/cloudstack-primate/issues/635
As a regular user role, I've got the option to delete with Expunge, and that
fails on backend (not visible in UI):
2020-08-28 10:51:12,561 DEBUG [c.c.a.ApiServlet]
(qtp129153987-33177:ctx-c4731a7e ctx-37bc0628) (logid:59a0d46c) ===END===
10.1.0.1 -- GET
id=ada553dc-2103-48af-a0a3-605867b8c630&expunge=true&command=destroyVirtualMachine&response=json
2020-08-28 10:51:12,561 INFO [o.a.c.f.j.i.AsyncJobMonitor]
(API-Job-Executor-108:ctx-54a4a8fc job-732) (logid:9f2159a1) Add job-732 into
job monitoring
2020-08-28 10:51:12,563 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl]
(API-Job-Executor-108:ctx-54a4a8fc job-732) (logid:3dc12c67) Executing
AsyncJobVO {id:732, userId: 4, accountId: 4, instanceType: VirtualMachine,
instanceId: 106, cmd: org.apache.cloudstack.api.command.user.vm.DestroyVMCmd,
cmdInfo:
{"response":"json","ctxUserId":"4","expunge":"true","httpmethod":"GET","ctxStartEventId":"1162","id":"ada553dc-2103-48af-a0a3-605867b8c630","ctxDetails":"{\"interface
com.cloud.vm.VirtualMachine\":\"ada553dc-2103-48af-a0a3-605867b8c630\"}","ctxAccountId":"4","uuid":"ada553dc-2103-48af-a0a3-605867b8c630","cmdEventType":"VM.DESTROY"},
cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result:
null, initMsid: 32989442554424, completeMsid: null, lastUpdated: null,
lastPolled: null, created: null, removed: null}
2020-08-28 10:51:12,564 ERROR [c.c.a.ApiAsyncJobDispatcher]
(API-Job-Executor-106:ctx-ed3b1351 job-730) (logid:9b47a1b1) Unexpected
exception while executing org.apache.cloudstack.api.command.user.vm.DestroyVMCmd
com.cloud.exception.PermissionDeniedException: Parameter expunge can be
passed by Admin only. Or when the allow.user.expunge.recover.vm key is set.
at
com.cloud.vm.UserVmManagerImpl.destroyVm(UserVmManagerImpl.java:2875)
at jdk.internal.reflect.GeneratedMethodAccessor821.invoke(Unknown
Source)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
i.e. we should show or hide that slider/checkbox based on that particular
global setting value
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]