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

 I' ve install the DMS module, but there are only 2 roles : user (read access) and manager (full rights) ! i'd like to filter document access based on groups : all users from same groups with full access and no access for other users ! Is it possible to do it with a record rules, and how please ??  


Thank you

Avatar
Discard
Author Best Answer

Thanks for your reply !

What i'd like to do is a kind of RBAC with documents : users from the same group can only access  the documents from his group ?? e.g if a document is created by an IT group member, only IT group can access the document and no other groups !

It looks like possibe to do that in Odoo with ACLs and record rules but it is not  so trivial to me !


Thanks for your help.


Ok find a solution :-)


add an extra field  for group selection in model document.document

modify form view to add that field

add a record rule to allow user to access their own documents or groups allowed from the extra field 

["|",('create_uid', '=', user.id),('x_doc_groups_ids','in', [g.id for g in user.groups_id])]



Avatar
Discard
Best Answer

Hi,

Right now the users and manager is group itself. If you select a user a manager in DMS , it means that the user is added into the group Manager.


From the question i understand that the group Manager have full access right and the group Users have only read access.


If you want a user to get full access then make the user manager, and if the user don't want any access just dont make him either the Manager / User. Make it empty.


If you are not looking for this, make the question clear.

To know more about the record rules have a look at this : https://www.odoo.com/documentation/8.0/reference/security.html

Thanks

Avatar
Discard