Merge lp:~openerp-dev/openobject-addons/trunk-bug-1172210-nco into lp:openobject-addons

Proposed by Nimesh Contractor(Open ERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1172210-nco
Merge into: lp:openobject-addons
Diff against target: 12 lines (+1/-1)
1 file modified
portal/security/portal_security.xml (+1/-1)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1172210-nco
Reviewer Review Type Date Requested Status
Thibault Delavallée (OpenERP) (community) Needs Fixing
Review via email: mp+162972@code.launchpad.net

Description of the change

Hello,

 Change the domain force of the record rule, so anonymous can see Portal images.

Thanks.

To post a comment you must log in.
Revision history for this message
Thibault Delavallée (OpenERP) (tde-openerp) wrote :

Hello,

This merge proposal does not solve the bug. The bug is that anonymous users that see messages try to see the avatar of the authors. However, anonymous user have no access to res.partner model. They can not access partner.image_small, leading to void images in Chatter.

The good way to fix it is to always allow to see a partner avatar (image, image_medium and image_small fields), whatever the access rules defined on res.partner. You should check in the controller how avatars are fetched or put into cache, see if the bug can be solved in the controler, or somewhere else (in the read of res.partner maybe ?).

review: Needs Fixing

Unmerged revisions

8698. By Ishwar Malvi(OpenERP)

[FIX] Anonymous can't see Portal images. by changing the domain force.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'portal/security/portal_security.xml'
2--- portal/security/portal_security.xml 2012-12-17 15:04:58 +0000
3+++ portal/security/portal_security.xml 2013-05-08 13:03:28 +0000
4@@ -5,7 +5,7 @@
5 <record id="portal_read_own_res_partner" model="ir.rule">
6 <field name="name">res_partner: read access on my partner</field>
7 <field name="model_id" ref="base.model_res_partner"/>
8- <field name="domain_force">[('user_ids', 'in', user.id)]</field>
9+ <field name="domain_force">['|',('user_id','=',user.id),('user_id','=',False)]</field>
10 <field name="groups" eval="[(4, ref('group_portal')), (4, ref('group_anonymous'))]"/>
11 <field name="perm_create" eval="False"/>
12 <field name="perm_unlink" eval="False"/>

Subscribers

People subscribed via source and target branches

to all changes: