Skip to content

FIX: allow non-officer users to open their profile#2107

Merged
Danielgergely merged 2 commits into
14.0from
fix-profile-selfreadable-support-reminder
Jun 26, 2026
Merged

FIX: allow non-officer users to open their profile#2107
Danielgergely merged 2 commits into
14.0from
fix-profile-selfreadable-support-reminder

Conversation

@Danielgergely

Copy link
Copy Markdown
Member

Register do_reminder_support_req as self-readable/writeable so the res.users self-read bypass works for employees without HR Officer rights.

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>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crm_request/models/res_users.py Outdated
@greptile-apps

greptile-apps Bot commented Jun 26, 2026

Copy link
Copy Markdown

Confidence Score: 5/5

The 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.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex inspected the pre-change profile self-access state and confirmed that do_reminder_support_req was absent from both self-readable and self-writeable lists, with read and write attempts raising permission errors.
  • T-Rex inspected the post-change state after model instantiation and confirmed the field was appended to both self-access lists and read/write attempts succeeded.
  • T-Rex compared the before and after results and verified the observed behavior aligns with the profile self-access permission contract.

View all artifacts

T-Rex Ran code and verified through T-Rex

Reviews (2): Last reviewed commit: "fix: check if permission already exists ..." | Re-trigger Greptile

@Danielgergely Danielgergely merged commit a0b8b76 into 14.0 Jun 26, 2026
2 checks passed
@Danielgergely Danielgergely deleted the fix-profile-selfreadable-support-reminder branch June 26, 2026 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant