From 28093140453b1fac0824f22aabd349108edd66e7 Mon Sep 17 00:00:00 2001
From: Richard Mathot <rim@openerp.com>
Date: Wed, 11 Jun 2014 11:47:55 +0200
Subject: [PATCH] [FIX] survey: security rules mess with xmlids

---
 addons/survey/security/survey_security.xml | 21 +++++----------------
 1 file changed, 5 insertions(+), 16 deletions(-)

diff --git a/addons/survey/security/survey_security.xml b/addons/survey/security/survey_security.xml
index fd047e5c2d4d..7375cf227ab1 100644
--- a/addons/survey/security/survey_security.xml
+++ b/addons/survey/security/survey_security.xml
@@ -14,18 +14,7 @@
         </record>
 
         <!-- Record rules -->
-        <record id="survey_public_access" model="ir.rule">
-            <field name="name">Public access to surveys</field>
-            <field name="model_id" ref="survey.model_survey_survey"/>
-            <field name="domain_force">[('auth_required', '=', False)]</field>
-            <field name="groups" eval="[(4, ref('base.group_public'))]"/>
-            <field eval="0" name="perm_unlink"/>
-            <field eval="0" name="perm_write"/>
-            <field eval="1" name="perm_read"/>
-            <field eval="0" name="perm_create"/>
-        </record>
-
-        <record id="survey_rule" model="ir.rule">
+        <record id="survey_users_access" model="ir.rule">
             <field name="name">Access to survey for regular users</field>
             <field name="model_id" ref="survey.model_survey_survey"/>
             <field name="domain_force">[('stage_id.closed', '=', False)]</field>
@@ -36,7 +25,7 @@
             <field eval="0" name="perm_create"/>
         </record>
 
-        <record id="survey_rule_manager" model="ir.rule">
+        <record id="survey_manager_access" model="ir.rule">
             <field name="name">Survey Manager access rights</field>
             <field name="model_id" ref="survey.model_survey_survey"/>
             <field name="domain_force">[(1, '=', 1)]</field>
@@ -47,7 +36,7 @@
             <field eval="1" name="perm_create"/>
         </record>
 
-        <record id="survey_public_access" model="ir.rule">
+        <record id="survey_input_public_access" model="ir.rule">
             <field name="name">Public access to user_input</field>
             <field name="model_id" ref="survey.model_survey_user_input"/>
             <field name="domain_force">[('create_uid', '=', user.id)]</field>
@@ -58,7 +47,7 @@
             <field eval="0" name="perm_create"/>
         </record>
 
-        <record id="survey_rule" model="ir.rule">
+        <record id="survey_input_users_access" model="ir.rule">
             <field name="name">Access to user_input for regular users</field>
             <field name="model_id" ref="survey.model_survey_user_input"/>
             <field name="domain_force">[('create_uid', '=', user.id)]</field>
@@ -69,7 +58,7 @@
             <field eval="0" name="perm_create"/>
         </record>
 
-        <record id="survey_rule_manager" model="ir.rule">
+        <record id="survey_input_manager_access" model="ir.rule">
             <field name="name">Survey Manager access rights</field>
             <field name="model_id" ref="survey.model_survey_user_input"/>
             <field name="domain_force">[(1, '=', 1)]</field>
-- 
GitLab