Merge lp:~openerp-dev/openobject-addons/trunk-bug-1103072-ishwar into lp:openobject-addons

Proposed by Ishwar Malvi(OpenERP)
Status: Needs review
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-bug-1103072-ishwar
Merge into: lp:openobject-addons
Diff against target: 44 lines (+15/-3)
2 files modified
survey/security/survey_security.xml (+10/-0)
survey/wizard/survey_send_invitation.py (+5/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-bug-1103072-ishwar
Reviewer Review Type Date Requested Status
Stefan Rijnhart (Opener) (community) Disapprove
OpenERP Core Team Pending
Review via email: mp+154662@code.launchpad.net

Description of the change

Hello,

      I have fixed a problem of survey : survey invited user can't able to answer survey.

Thanks,
Ishwar Malvi

To post a comment you must log in.
Revision history for this message
Stefan Rijnhart (Opener) (stefan-opener) wrote :

We feel that this change is granting too broad permissions to the invited respondents. My colleague Holger proposes a more refined change here:

https://code.launchpad.net/~therp-nl/openobject-addons/7.0_make_survey_module_usable_for_external_users/+merge/180328

review: Disapprove

Unmerged revisions

8639. By Ishwar Malvi(OpenERP)

[FIX] survey : In Survey Invitations invited user can't view survey

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'survey/security/survey_security.xml'
2--- survey/security/survey_security.xml 2012-04-04 09:08:30 +0000
3+++ survey/security/survey_security.xml 2013-03-21 10:57:43 +0000
4@@ -16,4 +16,14 @@
5 <field name="users" eval="[(4, ref('base.user_root'))]"/>
6 </record>
7 </data>
8+ <data noupdate="1">
9+ <record id="survey_rule" model="ir.rule">
10+ <field name="name">Survey</field>
11+ <field name="model_id" ref="model_survey" />
12+ <field name="global" eval="True" />
13+ <field name="domain_force">
14+ [('invited_user_ids', '=', user.id)]
15+ </field>
16+ </record>
17+ </data>
18 </openerp>
19
20=== modified file 'survey/wizard/survey_send_invitation.py'
21--- survey/wizard/survey_send_invitation.py 2012-12-06 14:56:32 +0000
22+++ survey/wizard/survey_send_invitation.py 2013-03-21 10:57:43 +0000
23@@ -108,8 +108,10 @@
24 mail_message = self.pool.get('mail.message')
25
26 model_data_obj = self.pool.get('ir.model.data')
27- group_id = model_data_obj._get_id(cr, uid, 'base', 'group_survey_user')
28- group_id = model_data_obj.browse(cr, uid, group_id, context=context).res_id
29+ group_id1= model_data_obj._get_id(cr, uid, 'base', 'group_survey_user')
30+ group_id1 = model_data_obj.browse(cr, uid, group_id1, context=context).res_id
31+ group_id2= model_data_obj._get_id(cr, uid, 'base', 'group_tool_manager')
32+ group_id2 = model_data_obj.browse(cr, uid, group_id2, context=context).res_id
33
34 act_id = self.pool.get('ir.actions.act_window')
35 act_id = act_id.search(cr, uid, [('res_model', '=' , 'survey.name.wiz'), \
36@@ -186,7 +188,7 @@
37 'login': partner.email,
38 'password': passwd,
39 'address_id': partner.id,
40- 'groups_id': [[6, 0, [group_id]]],
41+ 'groups_id': [[6, 0, [group_id1,group_id2]]],
42 'action_id': act_id[0],
43 'survey_id': [[6, 0, survey_ids]]
44 }

Subscribers

People subscribed via source and target branches

to all changes: