Defect #1320
closedApprove/Reject/Return to applicant buttons appears after refresh
100%
Description
- configured idm.sec.core.wf.approval.manager.enabled=true
- configured idm.sec.core.wf.role.approval1=approve-role-by-manager
- created role bcv-test with criticality=1
- as "admin" requested the role for user jdoe
- task for his manager was created
- click to tasks/all
- opened the task
- no Approve/deny buttons were present
- Pushed F5 button on my keyboard
- Page refreshed
- Approve/Reject/Return to applicant buttons apeared
I don't know which of these situations is correct. The one before F5 or the one after F5? However, the view of the task should stay consistent.
When I click on "Approve" I've got
"12.10.2018 15:16:50
Insufficient permissions
You do not have sufficient permissions for selected action."
error message.
Files
Updated by Vít Švanda about 6 years ago
- Assignee changed from Vít Švanda to Ondřej Kopr
Updated by Ondřej Kopr about 6 years ago
- Status changed from New to Needs feedback
- Assignee changed from Ondřej Kopr to Vít Švanda
- Target version changed from Onyx (9.3.0) to Morganite (9.2.2)
- % Done changed from 0 to 90
I fixed this. Thank you for nice description of the problem. Gif is very useful.
At first moments I thing it will be super easy fix, but the problem was not with showLoading. So I changed only one line, but debug was harder. Refresh and get permissions now works correctly. Please Vitek could you make a review? Thank you.
Commit: https://github.com/bcvsolutions/CzechIdMng/commit/9fff317637c63b352fb3b3863caad30f61edf538 (develop - 9.2.2-SNAPSHOT)
Updated by Vít Švanda about 6 years ago
- Assignee changed from Vít Švanda to Ondřej Kopr
- Returns DTO (Task) depends on the permission. If user has right on execute task are "generated" buttons (as metadata in task DTO).
- Problem is in the AbstractReadDtoController, where is DTO first loaded without permission and after that is DTO checked on permission.READ. The occurrs problem, because returned DTO has metadata for execute buttons (DTO was loaded without rights).
- I fixed that with override getDto method in task controller. Better solutions will be modified calling the lookup service directly with permissions, but that is bigger change.
Updated by Ondřej Kopr about 6 years ago
- Status changed from Needs feedback to Resolved
- Assignee changed from Ondřej Kopr to Vít Švanda
- % Done changed from 90 to 100
I simulate the issue and after your changes and it works correctly. Thanks for you change my code I'm so happy now :D.
Please close the ticket.