More code cleanup and fix bug around can_admin in the trigger_view
This commit is contained in:
parent
c89760278f
commit
0b990677a0
3 changed files with 25 additions and 39 deletions
|
@ -52,6 +52,9 @@ def trigger_view(trigger, can_read=False, can_admin=False):
|
|||
|
||||
repo_url = build_trigger.get_repository_url() if build_source else None
|
||||
|
||||
if can_admin:
|
||||
can_read = True
|
||||
|
||||
return {
|
||||
'service': trigger.service.name,
|
||||
'build_source': build_source if can_read else None,
|
||||
|
|
Reference in a new issue