Pārlūkot izejas kodu

allow access restriction for admin users

master
vecāks
revīzija
84a855c81a
2 mainītis faili ar 12 papildinājumiem un 0 dzēšanām
  1. +2
    -0
      defaults/main.yaml
  2. +10
    -0
      templates/buildbot/master.cfg.j2

+ 2
- 0
defaults/main.yaml Parādīt failu

@@ -21,3 +21,5 @@ buildbot_title_url: "{{ buildbot_base_url }}"
buildbot_base_url: https://{{buildbot_server_name}}/

buildbot_with_gitea_auth: false

buildbot_admin_usernames: []

+ 10
- 0
templates/buildbot/master.cfg.j2 Parādīt failu

@@ -49,8 +49,18 @@ c['www']['auth'] = util.GiteaAuth(
client_id='{{buildbot_gitea_auth_client_id}}',
client_secret='{{buildbot_gitea_auth_client_secret}}',
)
c['www']['authz'] = util.Authz(
allowRules=[
#util.AnyControlEndpointMatcher(role="admins"),
util.AnyEndpointMatcher(role="admins"),
],
roleMatchers=[
util.RolesFromUsername(roles=["admins"], usernames={{buildbot_admin_usernames|to_json}}),
]
)
{% endif %}


c['db'] = {
'db_url' : "{{buildbot_database_url}}",
}


Notiek ielāde…
Atcelt
Saglabāt