[IMP]GOLEM Security several improvements

This commit is contained in:
Fabien Bourgeois 2016-07-22 07:29:16 +02:00
parent 1a3c1f0050
commit f03e7cfd8b
6 changed files with 20 additions and 6 deletions

View File

@ -34,5 +34,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="implied_ids" eval="[(4, ref('group_golem_user'))]"/>
<field name="users" eval="[(4, ref('base.user_root'))]"/>
</record>
<!-- Hide Default Articles Menu for all except root -->
<record id="account.menu_finance_payables" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('base.group_erp_manager')])]" />
</record>
<!-- Membership products only for managers -->
<record id="membership.menu_membership_products" model="ir.ui.menu">
<field name="groups_id"
eval="[(4, ref('golem_base.group_golem_manager'))]" />
</record>
<!-- Members Analysis for managers only -->
<record id="membership.menu_report_membership" model="ir.ui.menu">
<field name="groups_id"
eval="[(6, 0, [ref('golem_base.group_golem_manager')])]" />
</record>
</data>
</openerp>

View File

@ -66,8 +66,7 @@ class GolemMember(models.Model):
pictures_agreement = fields.Boolean('Pictures agreement?')
opt_out_sms = fields.Boolean('Out of SMS campaigns')
season_ids = fields.Many2many('golem.season', string='Seasons',
required=True, auto_join=True,
default=_default_season,
required=True, default=_default_season,
ondelete='restrict')
is_current = fields.Boolean('Current user?', default=False, readonly=True,
store=True, compute='_compute_is_current')

View File

@ -113,7 +113,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<field name="model">golem.member</field>
<field name="arch" type="xml">
<tree string="GOLEM Members">
<field name="season_ids" />
<field name="season_ids" options="{'no_create': True}" />
<field name="number" />
<field name="name" />
<field name="contact_address" />

View File

@ -61,7 +61,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
name="Member skills"
parent="base.menu_marketing_config_association"
action="skills_action_list"
sequence="5" />
sequence="5" groups="golem_base.group_golem_manager" />
</data>
</openerp>

View File

@ -1,3 +1,3 @@
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
access_golem_season_user,Access GOLEM Season User,model_golem_season,golem_base.group_golem_user,1,0,0,0
access_golem_season_user,Access GOLEM Season User,model_golem_season,golem_base.group_golem_user,1,1,0,0
access_golem_season_manager,Access GOLEM Season Manager,model_golem_season,golem_base.group_golem_manager,1,1,1,1

1 id name model_id:id group_id:id perm_read perm_write perm_create perm_unlink
2 access_golem_season_user Access GOLEM Season User model_golem_season golem_base.group_golem_user 1 0 1 0 0
3 access_golem_season_manager Access GOLEM Season Manager model_golem_season golem_base.group_golem_manager 1 1 1 1

View File

@ -77,7 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<!-- Menus -->
<menuitem id="menu_seasons" name="GOLEM Seasons"
parent="base.menu_marketing_config_association" sequence="2"
action="action_list" />
action="action_list" groups="golem_base.group_golem_manager" />
</data>
</openerp>