Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
141 Lượt xem

When I try to log in with a test user in my custom Odoo module, I get this error:

Sorry, test1 (id=8) doesn’t have ‘read’ access to: User (res.users)

I have already given read access to both res.partner and res.users models in my ACL file for that test user’s groups.

I also created record rules for the res.partner model so each group can only access partners of a specific type like student, staff, or faculty.

But still, I get this read access error for res.users when I try to log in.

Can someone explain why this happens even though read access is granted in ACLs, and how to fix it properly?

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

Hi,

The "read access to res.users" error during login, despite granting read access in ACLs, often stems from the login process requiring more than basic read permissions. Odoo needs to access specific fields and methods on res.users for authentication and setup.

Troubleshooting involves checking ACL inheritance (ensuring your group inherits from base.group_user), reviewing record rules for undue restrictiveness, identifying specific fields being accessed during login and granting access to them, and checking for method access restrictions. Temporarily granting global read access to res.users can help diagnose if restricted access is the root cause. Also, verify module dependencies and review any custom code modifications to the login process. Grant the minimum necessary permissions to avoid security vulnerabilities and thoroughly test after any changes.


Hope it helps

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 20
5241
1
thg 9 16
4701
0
thg 3 15
3473
4
thg 12 23
40560
1
thg 11 24
3590