[IMP] portal: remove groups Portal Officer and Portal Manager
bzr revid: rco@openerp.com-20120914132113-15r6rcmiwb5tr5ia
This commit is contained in:
parent
3409bdbee9
commit
ca4326bbd1
|
@ -44,7 +44,6 @@ very handy when used in combination with the module 'share'.
|
|||
""",
|
||||
'website': 'http://www.openerp.com',
|
||||
'data': [
|
||||
'security/portal_security.xml',
|
||||
'security/ir.model.access.csv',
|
||||
'portal_data.xml',
|
||||
'portal_view.xml',
|
||||
|
|
|
@ -2,6 +2,12 @@
|
|||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Don't use any implied_ids here; this group's behavior is particular -->
|
||||
<record id="group_portal_member" model="res.groups">
|
||||
<field name="name">Portal Member</field>
|
||||
<field name="comment">Portal members can access information through the portal menu. Also, they are chrooted in this specific menu.</field>
|
||||
</record>
|
||||
|
||||
<record id="portal" model="res.portal">
|
||||
<field name="name">Portal</field>
|
||||
<field name="group_id" ref="group_portal_member"/>
|
||||
|
|
|
@ -84,7 +84,7 @@
|
|||
</record>
|
||||
|
||||
<!-- menu Administration/Portals/Portals -->
|
||||
<menuitem name="Portals Settings" id="portal_menu_settings" parent="base.menu_administration" groups="group_portal_manager"/>
|
||||
<menuitem name="Portals Settings" id="portal_menu_settings" parent="base.menu_administration"/>
|
||||
<menuitem name="Portals" id="portal_list_menu" parent="portal_menu_settings" action="portal_list_action"/>
|
||||
|
||||
</data>
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink
|
||||
access_all,access.portal.all,model_res_portal,,1,0,0,0
|
||||
access_widget_all,access.portal.widget.all,model_res_portal_widget,,1,0,0,0
|
||||
access_manager,access.portal.manager,model_res_portal,group_portal_manager,1,1,1,1
|
||||
access_widget_manager,access.portal.widget.manager,model_res_portal_widget,group_portal_manager,1,1,1,1
|
||||
access_mail_message,mail.message,mail.model_mail_message,group_portal_member,1,0,1,1
|
||||
access_mail_message_all,mail.message.all,mail.model_mail_message,group_portal_member,1,0,0,0
|
||||
access_mail_thread,mail.thread,mail.model_mail_thread,group_portal_member,1,0,0,0
|
||||
|
|
|
|
@ -1,33 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<openerp>
|
||||
<data noupdate="1">
|
||||
|
||||
<!-- Don't use any implied_ids here; this group's behavior is particular -->
|
||||
<record id="group_portal_member" model="res.groups">
|
||||
<field name="name">Portal Member</field>
|
||||
<field name="comment">Portal members can access information through the portal menu. Also, they are chrooted in this specific menu.</field>
|
||||
</record>
|
||||
|
||||
<record id="module_category_portal" model="ir.module.category">
|
||||
<field name="name">Portal</field>
|
||||
<field name="parent_id" ref="base.module_category_tools"/>
|
||||
<field name="sequence">25</field>
|
||||
</record>
|
||||
|
||||
<!-- No implied ids with 'member' since this group is highly restrictive (chrooted menu) -->
|
||||
<record id="group_portal_officer" model="res.groups">
|
||||
<field name="name">Officer</field>
|
||||
<field name="comment">Portal officers can create new portal users with the portal wizard.</field>
|
||||
<field name="category_id" ref="module_category_portal"/>
|
||||
</record>
|
||||
|
||||
<record id="group_portal_manager" model="res.groups">
|
||||
<field name="name">Manager</field>
|
||||
<field name="comment">Portal managers have access to the portal definitions, and can easily configure the users, access rights and menus of portal users.</field>
|
||||
<field name="category_id" ref="module_category_portal"/>
|
||||
<field name="implied_ids" eval="[(4, ref('group_portal_officer'))]"/>
|
||||
<field name="users" eval="[(4, ref('base.user_root'))]"/>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
|
@ -8,7 +8,7 @@
|
|||
res_model="res.portal.wizard"
|
||||
view_type="form" view_mode="form"
|
||||
key2="client_action_multi" target="new"
|
||||
groups="group_portal_officer"/>
|
||||
groups="base.group_partner_manager"/>
|
||||
|
||||
<!-- wizard view -->
|
||||
<record id="wizard_view" model="ir.ui.view">
|
||||
|
|
|
@ -44,9 +44,6 @@ class share_wizard_portal(osv.TransientModel):
|
|||
'group_ids': fields.many2many('res.groups', 'share_wizard_res_group_rel', 'share_id', 'group_id', 'Existing groups', domain=[('share', '=', False)]),
|
||||
}
|
||||
|
||||
def is_portal_manager(self, cr, uid, context=None):
|
||||
return self.has_group(cr, uid, module='portal', group_xml_id='group_portal_manager', context=context)
|
||||
|
||||
def _check_preconditions(self, cr, uid, wizard_data, context=None):
|
||||
if wizard_data.user_type == 'existing':
|
||||
self._assert(wizard_data.user_ids,
|
||||
|
|
|
@ -36,12 +36,12 @@
|
|||
<field name="inherit_id" ref="share.share_step2_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='result_line_ids']//field[@name='login']" position="after">
|
||||
<field name="share_url" groups="portal.group_portal_manager"/>
|
||||
<field name="share_url" groups="base.group_no_one"/>
|
||||
</xpath>
|
||||
<xpath expr="//field[@name='result_line_ids']" position="after">
|
||||
<newline/>
|
||||
<group string="Details">
|
||||
<field name="share_root_url" groups="portal.group_portal_manager"/>
|
||||
<group string="Details" groups="base.group_no_one">
|
||||
<field name="share_root_url"/>
|
||||
</group>
|
||||
</xpath>
|
||||
</field>
|
||||
|
|
Loading…
Reference in New Issue