FIX: allow non-officer users to open their profile#2107
Conversation
Register do_reminder_support_req as self-readable/writeable so the res.users self-read bypass works for employees without HR Officer rights. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the ResUsers model in crm_request/models/res_users.py by overriding the init method to add do_reminder_support_req to SELF_READABLE_FIELDS and SELF_WRITEABLE_FIELDS, allowing users to manage this preference on their own profile. The review feedback points out that since init can be called multiple times, appending to these class-level fields without checking can lead to duplicate entries, and suggests adding membership checks before appending.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Confidence Score: 5/5The change is limited to self-access field registration for a user preference and appears safe to merge. The modified surface is narrow and aligns with the intended access-control bypass for users editing their own profile preference.
What T-Rex did
Reviews (2): Last reviewed commit: "fix: check if permission already exists ..." | Re-trigger Greptile |
Register do_reminder_support_req as self-readable/writeable so the res.users self-read bypass works for employees without HR Officer rights.