跳至内容
菜单
此问题已终结
2 回复
4487 查看

I have restricted access to users in the Contact app. I only want them to see contacts they created so I added the record rule below:

[('create_uid','=',user.id)]

But when the user views a contact (that they created) the following error message appears:

"

Due to security restrictions, you are not allowed to access 'Contact' (res.partner) records. Records: feryialmangou (id=7) User: feryialmangou (id=6) This restriction is due to the following rules: - Contact Restriction User Contact your administrator to request access if necessary.

"



How do I make it so that the error message does not appear? As it gets annoying for the users. 

形象
丢弃

This doesn't fix the issue. I still see the same access error message. 

最佳答案

Hi Feryial,


Try to replace your record rule with this rule it helps to show only ones created by the user.


Change:

[('create_uid','=',user.id)]

To:

['|',('user_id','=',user.id),('user_id','=',False)]


Best Regards.

形象
丢弃
最佳答案

You will have to take the chatter section into consideration as well. Any follower on a contact not accessible to the user has the potential to break the the view. Same goes for any related contact (for example a sub-contact (an individual) within a company-type contact).

形象
丢弃
相关帖文 回复 查看 活动
2
1月 25
2313
3
1月 24
1832
0
3月 21
68
1
12月 20
7100
0
8月 19
3701