mirror of
https://github.com/odoo/runbot.git
synced 2025-03-16 16:05:42 +07:00
[FIX] runbot: fix config access rights
This commit is contained in:
parent
98913f6d39
commit
8a7e0b20aa
@ -153,7 +153,7 @@ class ConfigStep(models.Model):
|
||||
if not re.match(name_reg, values.get('name')):
|
||||
raise UserError('Name cannot contain special char or spaces exepts "_" and "-"')
|
||||
if not self.env.user.has_group('runbot.group_build_config_administrator'):
|
||||
if (values.get('job_type') == 'python' or ('python_code' in values and values['python_code'])):
|
||||
if (values.get('job_type') == 'python' or ('python_code' in values and values['python_code'] and values['python_code'] != "# type python code here\n\n\n\n\n\n")):
|
||||
raise UserError('cannot create or edit config step of type python code')
|
||||
if (values.get('extra_params')):
|
||||
reg = r'^[a-zA-Z0-9\-_ "]*$'
|
||||
|
@ -51,7 +51,7 @@
|
||||
<field name="name">All config can be edited by config admin</field>
|
||||
<field name="groups" eval="[(4, ref('group_build_config_administrator'))]"/>
|
||||
<field name="model_id" ref="model_runbot_build_config"/>
|
||||
<field name="domain_force">[('1', '=', '1')]</field>
|
||||
<field name="domain_force">[(1, '=', 1)]</field>
|
||||
<field name="perm_write" eval="True"/>
|
||||
<field name="perm_unlink" eval="True"/>
|
||||
<field name="perm_read" eval="False"/>
|
||||
|
Loading…
Reference in New Issue
Block a user