From 354190b44e9e49fb03deb01098a58c52ce1f4e90 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Mon, 16 Dec 2013 16:07:26 +0100 Subject: [PATCH] [IMP] gamification: add portal_gamification module to add security rules bzr revid: mat@openerp.com-20131216150726-su27319fvvxevam6 --- .../gamification/security/ir.model.access.csv | 13 +++--- addons/hr_gamification/__openerp__.py | 2 +- addons/portal_gamification/__init__.py | 21 ++++++++++ addons/portal_gamification/__openerp__.py | 42 +++++++++++++++++++ .../security/ir.model.access.csv | 7 ++++ .../security/portal_security.xml | 9 ++++ 6 files changed, 86 insertions(+), 8 deletions(-) create mode 100644 addons/portal_gamification/__init__.py create mode 100644 addons/portal_gamification/__openerp__.py create mode 100644 addons/portal_gamification/security/ir.model.access.csv create mode 100644 addons/portal_gamification/security/portal_security.xml diff --git a/addons/gamification/security/ir.model.access.csv b/addons/gamification/security/ir.model.access.csv index 5144e26d2bb..3ea86d2c25b 100644 --- a/addons/gamification/security/ir.model.access.csv +++ b/addons/gamification/security/ir.model.access.csv @@ -1,20 +1,19 @@ id,name,model_id/id,group_id/id,perm_read,perm_write,perm_create,perm_unlink -goal_anybody,"Goal Anybody",model_gamification_goal,,1,1,0,0 +goal_employee,"Goal Employee",model_gamification_goal,base.group_user,1,1,0,0 goal_manager,"Goal Manager",model_gamification_goal,group_goal_manager,1,1,1,1 -goal_type_anybody,"Goal Type Anybody",model_gamification_goal_type,,1,0,0,0 +goal_type_employee,"Goal Type Employee",model_gamification_goal_type,base.group_user,1,0,0,0 goal_type_manager,"Goal Type Manager",model_gamification_goal_type,group_goal_manager,1,1,1,1 -plan_anybody,"Goal Plan Anybody",model_gamification_goal_plan,,1,0,0,0 +plan_employee,"Goal Plan Employee",model_gamification_goal_plan,base.group_user,1,0,0,0 plan_manager,"Goal Plan Manager",model_gamification_goal_plan,group_goal_manager,1,1,1,1 -planline_anybody,"Goal Planline Anybody",model_gamification_goal_planline,,1,0,0,0 +planline_employee,"Goal Planline Employee",model_gamification_goal_planline,base.group_user,1,0,0,0 planline_manager,"Goal Planline Manager",model_gamification_goal_planline,group_goal_manager,1,1,1,1 -badge_anybody,"Badge Anybody",model_gamification_badge,,1,0,0,0 +badge_employee,"Badge Employee",model_gamification_badge,base.group_user,1,0,0,0 badge_manager,"Badge Manager",model_gamification_badge,group_goal_manager,1,1,1,1 -badge_user_anybody,"Badge-user Anybody",model_gamification_badge_user,,1,0,0,0 -badge_user_user,"Badge-user User",model_gamification_badge_user,base.group_user,1,1,1,0 +badge_user_employee,"Badge-user Employee",model_gamification_badge_user,base.group_user,1,1,1,0 badge_user_manager,"Badge-user Manager",model_gamification_badge_user,group_goal_manager,1,1,1,1 diff --git a/addons/hr_gamification/__openerp__.py b/addons/hr_gamification/__openerp__.py index 7dbf5d76df2..d5d79dba074 100644 --- a/addons/hr_gamification/__openerp__.py +++ b/addons/hr_gamification/__openerp__.py @@ -2,7 +2,7 @@ ############################################################################## # # OpenERP, Open Source Management Solution -# Copyright (C) 2004-2013 Tiny SPRL (). +# Copyright (C) 2013 OpenERP SA (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/addons/portal_gamification/__init__.py b/addons/portal_gamification/__init__.py new file mode 100644 index 00000000000..26c654db9dd --- /dev/null +++ b/addons/portal_gamification/__init__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2004-2010 Tiny SPRL (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + diff --git a/addons/portal_gamification/__openerp__.py b/addons/portal_gamification/__openerp__.py new file mode 100644 index 00000000000..e20e54be6e3 --- /dev/null +++ b/addons/portal_gamification/__openerp__.py @@ -0,0 +1,42 @@ +# -*- coding: utf-8 -*- +############################################################################## +# +# OpenERP, Open Source Management Solution +# Copyright (C) 2013 OpenERP SA (). +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +############################################################################## + + +{ + 'name': 'Portal Gamification', + 'version': '1', + 'category': 'Tools', + 'complexity': 'easy', + 'description': """ +This module adds security rules for gamification to allow portal users to participate to challenges +=================================================================================================== + """, + 'author': 'OpenERP SA', + 'depends': ['gamification','portal'], + 'data': [ + 'security/ir.model.access.csv', + 'security/portal_security.xml', + ], + 'installable': True, + 'auto_install': True, + 'category': 'Hidden', +} + diff --git a/addons/portal_gamification/security/ir.model.access.csv b/addons/portal_gamification/security/ir.model.access.csv new file mode 100644 index 00000000000..963053df0de --- /dev/null +++ b/addons/portal_gamification/security/ir.model.access.csv @@ -0,0 +1,7 @@ +id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink +goal_portal,"Goal Portal",gamification.model_gamification_goal,portal.group_portal,1,1,0,0 +goal_type_portal,"Goal Type Portal",gamification.model_gamification_goal_type,portal.group_portal,1,0,0,0 +plan_portal,"Goal Plan Portal",gamification.model_gamification_goal_plan,portal.group_portal,1,0,0,0 +planline_portal,"Goal Planline Portal",gamification.model_gamification_goal_planline,portal.group_portal,1,0,0,0 +badge_portal,"Badge Portal",gamification.model_gamification_badge,portal.group_portal,1,0,0,0 +badge_user_portal,"Badge-user Portal",gamification.model_gamification_badge_user,portal.group_portal,1,1,1,0 diff --git a/addons/portal_gamification/security/portal_security.xml b/addons/portal_gamification/security/portal_security.xml new file mode 100644 index 00000000000..6b46fe96519 --- /dev/null +++ b/addons/portal_gamification/security/portal_security.xml @@ -0,0 +1,9 @@ + + + + + + + + +