mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-06 20:10:08 +01:00
Add authentication rules to the BuildBot
This commit is contained in:
@@ -366,7 +366,7 @@ c['www'] = dict(port=MASTER_WWW_PORT,
|
||||
change_hook_auth=[strcred.makeChecker("file:changehook.passwd")],
|
||||
)
|
||||
|
||||
c['www']['ui_default_config'] = {
|
||||
c['www']['ui_default_config'] = {
|
||||
'Waterfall.scaling_waterfall': 0.058527663465935076,
|
||||
'Waterfall.min_column_width_waterfall': 35,
|
||||
'Waterfall.lazy_limit_waterfall': 50,
|
||||
@@ -378,18 +378,23 @@ c['www']['ui_default_config'] = {
|
||||
'Workers.show_old_workers': True,
|
||||
}
|
||||
|
||||
# Authentication required for anything beyond viewing
|
||||
authz = util.Authz(
|
||||
stringsMatcher=util.fnmatchStrMatcher, # simple matcher with '*' glob character
|
||||
allowRules=[
|
||||
util.AnyEndpointMatcher(role="admins", defaultDeny=False),
|
||||
util.StopBuildEndpointMatcher(role="admins"),
|
||||
util.ForceBuildEndpointMatcher(builder="*", role="admins"),
|
||||
util.AnyControlEndpointMatcher(role='admins'),
|
||||
],
|
||||
roleMatchers=[
|
||||
util.RolesFromUsername(roles=['admins'], usernames=['robin'])
|
||||
]
|
||||
)
|
||||
auth=util.UserPasswordAuth(bbpasswd.ADMIN_USERS)
|
||||
c['www']['auth'] = auth
|
||||
c['www']['authz'] = authz
|
||||
|
||||
# TODO: Fix the security/auth stuff!!
|
||||
# Add security so only admins can start builds, etc.
|
||||
# c['www']['authz'] = util.Authz(
|
||||
# allowRules = [
|
||||
# util.AnyEndpointMatcher(role="admins", defaultDeny=False)
|
||||
# ],
|
||||
# roleMatchers = [
|
||||
# util.RolesFromUsername(roles=['admins'], usernames=['robin'])
|
||||
# ]
|
||||
# )
|
||||
# c['www']['auth'] = util.UserPasswordAuth(bbpasswd.ADMIN_USERS)
|
||||
|
||||
|
||||
##---------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user