summaryrefslogtreecommitdiff
path: root/addons/document/document.py
diff options
context:
space:
mode:
authorP. Christeas <p_christ@hol.gr>2010-11-23 20:49:38 +0200
committerP. Christeas <p_christ@hol.gr>2010-11-23 20:49:38 +0200
commit2aa5d026d1b2c562fef370c37604a7378788b4a3 (patch)
tree6df8811735e6ce0133e9cbb0f96e1f3a7b7dcd7c /addons/document/document.py
parent972d09e09d5a5654baf79a6b253fa5cfdc661c57 (diff)
document: fix access of res.users folders
We need to relax the rule of ir.attachment. Needs server patch, see commit message there. bzr revid: p_christ@hol.gr-20101123184938-jklijdqt0xx5u6cs
Diffstat (limited to 'addons/document/document.py')
-rw-r--r--addons/document/document.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/addons/document/document.py b/addons/document/document.py
index e3d810668b4..790b650d4f5 100644
--- a/addons/document/document.py
+++ b/addons/document/document.py
@@ -133,6 +133,15 @@ class document_file(osv.osv):
return False
return True
+ def check(self, cr, uid, ids, mode, context=None, values=None):
+ """Check access wrt. res_model, relax the rule of ir.attachment parent
+
+ With 'document' installed, everybody will have access to attachments of
+ any resources they can *read*.
+ """
+ return super(document_file, self).check(cr, uid, ids, mode='read',
+ context=context, values=values)
+
def copy(self, cr, uid, id, default=None, context=None):
if not default:
default = {}