浏览代码

allow access restriction for admin users

master
父节点
当前提交
84a855c81a
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. +2
    -0
      defaults/main.yaml
  2. +10
    -0
      templates/buildbot/master.cfg.j2

+ 2
- 0
defaults/main.yaml 查看文件

@@ -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 查看文件

@@ -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}}",
}


正在加载...
取消
保存