[DEFECT] Cache Not Flushed After User Permission Update
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
There is a caching problem related to user permission configuration. This issue occurs every time a permission for a user is modified. Upon making a modification, the cache is not flushed, leading the user to perceive that no changes have occurred and that the permissions are not working. This issue is reproducible consistently and impacts any user whose permissions are being managed, leading to confusion and functional blockers when permissions are expected to take immediate effect
Steps to Reproduce
- Select a user and verify that they do not have a specific permission enabled (e.g., using the
/drive/searchendpoint as shown in the video) - Navigate to Settings -> Users and select the aforementioned user
- From the 'Permissions' tab, modify the user's permissions to grant access to the resource in question (e.g., the
/drive/searchendpoint) - Verify the permission again by repeating step 1 (e.g., attempt to execute the
/drive/searchendpoint)
Expected Result: The permission should update correctly, and the endpoint should allow execution by the user
Actual Result: The permission remains outdated due to the cache, preventing the endpoint call
https://github.com/user-attachments/assets/f3126eb8-b908-40b6-bbea-9a395d96b32b
Acceptance Criteria
To resolve this issue, the following objective criteria must be met:
- When a change is made to any user's permissions, the corresponding cache must be updated with that change
- If an attempt is made to access a resource that is under a permission and this access is initially denied, enabling the permission must allow repeating the access attempt successfully without the need for a manual cache flush
dotCMS Version
main
Severity
Medium - Some functionality impacted
Links
NA
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the user permission update flow from Settings > Users > Permissions and the authorization check for the /drive/search endpoint, then identify where permission results are cached. Verify the cache is refreshed after permission changes and that a previously denied request succeeds on retry without a manual flush.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authorization
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100