Skip to Content
Menu
This question has been flagged
2 Replies
2119 Views

Can anyone please tell me how I can restrict the user from being able to see other users contact but still can create or delete or update his own?

Avatar
Discard

When i do the  Cybrosis Team Solution, i get this whenever i try to log in:

Access Error

CLOSE

Due to security restrictions, you are not allowed to access 'User' (res.users) records. Records: user1 (id=11) User: user1 (id=11) This restriction is due to the following rules: Contact your administrator to request access if necessary.


Best Answer

Hi,

You can create a record rule and give all access (read, write, create, delete) and apply the below domain:

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

This rule will be applied to all users included the admin user.



Avatar
Discard
Author

hello when I do that and create a new contact it gives me this error "Due to security restrictions, you are not allowed to create 'Contact' (res.partner) records.

Records: test (id=5370)
User: Usman Amanullah (id=21)

This restriction is due to the following rules:
- Restrict Emp

Contact your administrator to request access if necessary."

Author

also, I need it only for specific group

Best Answer

Hi,

We can create a record rule 
Go to Settings > Enable the debug Mode > Technical > Record Rules
Create a rule for model contact with access for only read update the domain force as following

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

 

Regards.

Avatar
Discard
Author

I created it just like you said and I checked only the Apply for Read but when I try to add a contact it gives me "Due to security restrictions, you are not allowed to access 'Contact' (res.partner) records.

Records: Test (id=5367)
User: Usman Amanullah (id=21)

This restriction is due to the following rules:
- Restrict Contacts

Contact your administrator to request access if necessary."