diff --git a/website_security/README.rst b/website_security/README.rst deleted file mode 100644 index 80386cd8..00000000 --- a/website_security/README.rst +++ /dev/null @@ -1,66 +0,0 @@ -.. |company| replace:: ADHOC SA - -.. |company_logo| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-logo.png - :alt: ADHOC SA - :target: https://www.adhoc.com.ar - -.. |icon| image:: https://raw.githubusercontent.com/ingadhoc/maintainer-tools/master/resources/adhoc-icon.png - -.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png - :target: https://www.gnu.org/licenses/agpl - :alt: License: AGPL-3 - -================ -Website Security -================ - -Give availability to restrict website menus and pages to some groups. - -Installation -============ - -To install this module, you need to: - -Configuration -============= - -To configure this module, you need to: - - -Usage -===== - -To use this module, you need to: - - -.. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas - :alt: Try me on Runbot - :target: http://runbot.adhoc.com.ar/ - -Bug Tracker -=========== - -Bugs are tracked on `GitHub Issues -`_. In case of trouble, please -check there if your issue has already been reported. If you spotted it first, -help us smashing it by providing a detailed and welcomed feedback. - -Credits -======= - -Images ------- - -* |company| |icon| - -Contributors ------------- - -Maintainer ----------- - -|company_logo| - -This module is maintained by the |company|. - -To contribute to this module, please visit https://www.adhoc.com.ar. diff --git a/website_security/__init__.py b/website_security/__init__.py deleted file mode 100755 index d0337769..00000000 --- a/website_security/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -############################################################################## -# For copyright and license notices, see __manifest__.py file in module root -# directory -############################################################################## -from . import models diff --git a/website_security/__manifest__.py b/website_security/__manifest__.py deleted file mode 100644 index 06c4fd5d..00000000 --- a/website_security/__manifest__.py +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################## -# -# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) -# All Rights Reserved. -# -# 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': 'Website Security', - 'version': '11.0.1.0.0', - 'category': 'Website', - 'sequence': 14, - 'summary': '', - 'author': 'ADHOC SA', - 'website': 'www.adhoc.com.ar', - 'license': 'AGPL-3', - 'images': [ - ], - 'depends': [ - 'website', - # 'portal', - ], - 'data': [ - 'views/website_views.xml', - 'security/security.xml', - ], - 'demo': [ - ], - 'installable': True, - 'auto_install': False, - 'application': False, -} diff --git a/website_security/i18n/es.po b/website_security/i18n/es.po deleted file mode 100644 index c4e9c783..00000000 --- a/website_security/i18n/es.po +++ /dev/null @@ -1,63 +0,0 @@ -# Translation of Odoo Server. -# This file contains the translation of the following modules: -# * website_security -# -msgid "" -msgstr "" -"Project-Id-Version: Odoo Server 11.0+e\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2018-05-11 11:49+0000\n" -"PO-Revision-Date: 2018-05-11 11:49+0000\n" -"Last-Translator: <>\n" -"Language-Team: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" -"Plural-Forms: \n" - -#. module: website_security -#: model:ir.model.fields,field_description:website_security.field_website_menu_group_ids -msgid "Groups" -msgstr "Grupos" - -#. module: website_security -#: model:ir.model.fields,help:website_security.field_website_menu_group_ids -msgid "If you have groups, the visibility of this menu will be based on these groups. If this field is empty, Odoo will compute visibility based on the related object's read access." -msgstr "Si tiene grupos definidos, la visibilidad de este menú se basará en estos grupos. Si el campo está vacío, Odoo calculará la visibilidad basada en los permisos de lectura del objeto relacionado." - -#. module: website_security -#: model:ir.actions.act_window,name:website_security.action_website_menu -msgid "Menu" -msgstr "Menu" - -#. module: website_security -#: model:ir.ui.menu,name:website_security.website_menu_menu -msgid "Menus" -msgstr "Menus" - -#. module: website_security -#: model:ir.ui.menu,name:website_security.website_sub_menu -msgid "Security" -msgstr "Seguridad" - -#. module: website_security -#: model:ir.model.fields,field_description:website_security.field_website_menu_related_view_id -msgid "View" -msgstr "Ver" - -#. module: website_security -#: model:ir.actions.act_window,name:website_security.website_action_ui_view -#: model:ir.ui.menu,name:website_security.menu_website_view -msgid "Views" -msgstr "Vistas" - -#. module: website_security -#: model:ir.model,name:website_security.model_website_menu -msgid "Website Menu" -msgstr "Menú del sitio web" - -#. module: website_security -#: model:ir.ui.view,arch_db:website_security.menu_form -msgid "Website Menus" -msgstr "Website Menus" - diff --git a/website_security/migrations/9.0.1.0.0/mig_data.xml b/website_security/migrations/9.0.1.0.0/mig_data.xml deleted file mode 100644 index 9e034cb3..00000000 --- a/website_security/migrations/9.0.1.0.0/mig_data.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/website_security/migrations/9.0.1.0.0/post-migration.py b/website_security/migrations/9.0.1.0.0/post-migration.py deleted file mode 100644 index 608fa105..00000000 --- a/website_security/migrations/9.0.1.0.0/post-migration.py +++ /dev/null @@ -1,29 +0,0 @@ -############################################################################## -# -# OpenUpgrade module for Odoo -# @copyright 2015-Today: Odoo Community Association -# @author: Stephane LE CORNEC -# -# 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 . -# -############################################################################## - -from openupgradelib import openupgrade - - -@openupgrade.migrate() -def migrate(cr, version): - # because this module is renamed, we need to inforce load of this data - openupgrade.load_data( - cr, 'website_security', 'migrations/9.0.1.0.0/mig_data.xml') diff --git a/website_security/models/__init__.py b/website_security/models/__init__.py deleted file mode 100644 index a5f34695..00000000 --- a/website_security/models/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -############################################################################## -# For copyright and license notices, see __manifest__.py file in module root -# directory -############################################################################## -from . import website diff --git a/website_security/models/website.py b/website_security/models/website.py deleted file mode 100644 index 3e0dce64..00000000 --- a/website_security/models/website.py +++ /dev/null @@ -1,49 +0,0 @@ -############################################################################## -# For copyright and license notices, see __manifest__.py file in module root -# directory -############################################################################## -from odoo import api, fields, models - - -class WebsiteMenu(models.Model): - _inherit = "website.menu" - - related_view_id = fields.Many2one( - related='page_id.view_id', - readonly=True - ) - - group_ids = fields.Many2many( - 'res.groups', - 'website_menu_group_rel', - 'menu_id', - 'gid', - 'Groups', - # domain=[('is_portal', '=', True)], - context={'default_is_portal': True}, - help="If you have groups, the visibility of this menu will be based " - "on these groups. " - "If this field is empty, Odoo will compute visibility based on the " - "related object's read access." - ) - - @api.multi - @api.onchange('group_ids') - def change_groups(self): - for rec in self: - if rec.related_view_id and not rec.related_view_id.groups_id: - rec.related_view_id.write( - {'groups_id': [(6, False, rec.group_ids.ids)]}) - - @api.multi - def write(self, vals): - res = super(WebsiteMenu, self).write(vals) - self.add_rights_submenu() - return res - - def add_rights_submenu(self): - if self.parent_id and self.parent_id.group_ids and not self.group_ids: - self.group_ids = self.parent_id.group_ids.ids - if self.related_view_id and not self.related_view_id.groups_id: - self.related_view_id.write( - {'groups_id': [(6, False, self.group_ids.ids)]}) diff --git a/website_security/security/security.xml b/website_security/security/security.xml deleted file mode 100644 index 0bdc1ba9..00000000 --- a/website_security/security/security.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Website Menus - - ['|', ('group_ids', '=', False), ('group_ids','in', [g.id for g in user.groups_id])] - - - - - Website Menus - Website designer - - [(1, '=', 1)] - - - - - - Website Views - - ['|', '|', ('type', '!=', 'qweb'), ('groups_id', '=', False), ('groups_id','in', [g.id for g in user.groups_id])] - - - - - Website Views - Website designer - - [(1, '=', 1)] - - - - diff --git a/website_security/views/website_views.xml b/website_security/views/website_views.xml deleted file mode 100644 index 52683912..00000000 --- a/website_security/views/website_views.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - Views - ir.actions.act_window - ir.ui.view - - {'search_default_active': 1} - [('type', '=', 'qweb')] - - - - - - - Menu - website.menu - list,form - - - - - - website.menu.tree - website.menu - - - - - - - - - - Search view for Website - website.menu - - - - - - - - - - website.menu.form - website.menu - -
- - - - - - - - - -
-
-
-