Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ

Hi all,

I've faced the problem between record rules and access rights. This is as below:

I have 1 groups "user" in my model with perm_read,perm_write,perm_create,perm_unlink as 1,1,1,0

I have 2 record rules for this group as:

edit only own record: 

  • domain_force: [('user_id','=',user.id)]

  • perm_read,perm_write,perm_create,perm_unlink as 1,1,1,0

Read only other record:

  • domain_force: [('user_id','!=',user.id)]

  • perm_read,perm_write,perm_create,perm_unlink as 1,0,0,0

My problem is: I can edit whole the record and it does not apply my created rules.

What's wrong with my setting?

Can anyone help me.

Many thanks in advance

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

I got the anwser:

Boolean fields (read, write, create, delete) of ir.rule mean Apply this rule for this kind of operation. They do not mean restrict access for this kind of operation. 

Ảnh đại diện
Huỷ bỏ

hey

the question remains anyway.

how can we restrict access for a special kind of operation ?

(restrict fields per user per object ?)

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 22
4334
2
thg 1 24
2459
2
thg 2 21
2272
2
thg 6 24
3213
0
thg 2 24
1202