8000 [16.0][MIG] base_model_restrict_update: Migration to 16.0 by nobuQuartile · Pull Request #3150 · OCA/server-tools · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[16.0][MIG] base_model_restrict_update: Migration to 16.0 #3150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: 16.0
Choose a base branch
from

Conversation

nobuQuartile
Copy link
@nobuQuartile nobuQuartile commented Dec 18, 2024

@qrtl QT4777

@yostashiro
Copy link
Member

This one supersedes #3134.

#: code:addons/base_model_restrict_update/models/res_users.py:0
#, python-format
msgid "You cannot make the admin user read-only."
msgstr "管理者ユーザは読取専用にできません。"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msgstr "管理者ユーザは読取専用にできません。"
msgstr "管理者ユーザは読取専用にできません。"

@nobuQuartile nobuQuartile force-pushed the 16.0-mig-2-base_model_restrict_update branch 2 times, most recently from 0abac53 to 3cca3ee Compare March 13, 2025 23:35
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-mig-2-base_model_restrict_update branch from 3cca3ee to ae16729 Compare April 25, 2025 01:40
Copy link
Contributor
@AungKoKoLin1997 AungKoKoLin1997 left a comment

Choose a reason for hiding this comment

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

Code Review: LGTM

@AungKoKoLin1997
Copy link
Contributor
AungKoKoLin1997 commented Apr 25, 2025

Seems like test fails is fixed by theses PR.
#3264
#3271

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-mig-2-base_model_restrict_update branch from ae16729 to ffea181 Compare April 28, 2025 02:15
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-mig-2-base_model_restrict_update branch from ffea181 to c4d7f4c Compare April 30, 2025 02:11
Copy link
Member
@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

Please squash the last two commits into one.

@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-mig-2-base_model_restrict_update branch from c4d7f4c to 5359b6a Compare May 7, 2025 02:41
…llow read-only exception models

Previously, the exemption for the model update restriction was given by
setting unrestrict_model_update to the relevant users. However, this
design had the limitation of not being able to control the permitted
users per model.

This commit addresses this limitation by adding the update_allowed_group_ids
field to ir.model, removing the unrestrict_model_update field from
res.users.

This commit also contains the following changes:

- Make the logic of _check_is_readonly_user() more complete.
- Refactor tests to make them more comprehensive.
- Add the flexibility of allowing certain models to be
  excluded from being read-only even when the user is set as read-only.
@AungKoKoLin1997 AungKoKoLin1997 force-pushed the 16.0-mig-2-base_model_restrict_update branch from 5359b6a to 69a3fea Compare May 7, 2025 02:43
@AungKoKoLin1997
Copy link
Contributor

Please squash the last two commits into one.

@yostashiro Done!

Copy link
Member
@yostashiro yostashiro left a comment

Choose a reason for hiding this comment

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

LGTM. This module has been in production use for a while.

@OCA-git-bot
Copy link
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants
0