mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 13:25:47 +07:00
[FIX] runbot: use proper manager visibility
The token is not meant to be used by anyone except runbot managers. Reported by @nilshamerlinck - thanks!
This commit is contained in:
parent
3b1145b4ab
commit
e1ecb49f89
@ -214,7 +214,7 @@ class runbot_repo(osv.osv):
|
|||||||
id1='dependant_id', id2='dependency_id',
|
id1='dependant_id', id2='dependency_id',
|
||||||
string='Extra dependencies',
|
string='Extra dependencies',
|
||||||
help="Community addon repos which need to be present to run tests."),
|
help="Community addon repos which need to be present to run tests."),
|
||||||
'token': fields.char("Github token"),
|
'token': fields.char("Github token", groups="runbot.group_runbot_admin"),
|
||||||
'group_ids': fields.many2many('res.groups', string='Limited to groups'),
|
'group_ids': fields.many2many('res.groups', string='Limited to groups'),
|
||||||
}
|
}
|
||||||
_defaults = {
|
_defaults = {
|
||||||
@ -457,7 +457,7 @@ class runbot_branch(osv.osv):
|
|||||||
def _get_pull_head_name(self, cr, uid, ids, field_name, arg, context=None):
|
def _get_pull_head_name(self, cr, uid, ids, field_name, arg, context=None):
|
||||||
r = dict.fromkeys(ids, False)
|
r = dict.fromkeys(ids, False)
|
||||||
for bid in ids:
|
for bid in ids:
|
||||||
pi = self._get_pull_info(cr, uid, [bid], context=context)
|
pi = self._get_pull_info(cr, SUPERUSER_ID, [bid], context=context)
|
||||||
if pi:
|
if pi:
|
||||||
r[bid] = pi['head']['ref']
|
r[bid] = pi['head']['ref']
|
||||||
return r
|
return r
|
||||||
|
Loading…
Reference in New Issue
Block a user