Implement sme basic role matchers

This commit is contained in:
2018-02-19 17:08:55 +01:00
parent 6aa88309aa
commit 68728ca910

View File

@@ -347,25 +347,47 @@ c['configurators'] = [util.JanitorConfigurator(
hour=12, hour=12,
dayOfWeek=6)] dayOfWeek=6)]
# WWW # WWW
c['www'] = dict(port=8010, c['www'] = dict(port=8010,
plugins={'console_view': {}, plugins={'console_view': {},
'grid_view': {}, 'grid_view': {},
'waterfall_view': {}}) 'waterfall_view': {}})
# Access
authz = util.Authz(
stringsMatcher=util.fnmatchStrMatcher, # simple matcher with '*' glob character
# stringsMatcher = util.reStrMatcher, # if you prefer regular expressions
allowRules=[
# admins can do anything,
# defaultDeny=False: if user does not have the admin role, we continue parsing rules
util.AnyEndpointMatcher(role="admins", defaultDeny=False),
# Defaulting old config, everyone can stop build.
util.StopBuildEndpointMatcher(role="*"),
# if future Buildbot implement new control, we are safe with this last rule
util.AnyControlEndpointMatcher(role="admins")
],
)
c['www']['authz'] = authz
# PROJECT IDENTITY # PROJECT IDENTITY
c['projectName'] = "Blender" c['projectName'] = "Blender"
c['projectURL'] = "https://www.blender.org" #c['projectURL'] = "https://www.blender.org"
c['projectURL'] = "http://localhost:8010/"
# Buildbot information # Buildbot information
c['buildbotURL'] = "https://builder.blender.org/admin/" # c['buildbotURL'] = "https://builder.blender.org/admin/"
c['buildbotURL'] = "http://localhost:8010/"
c['buildbotNetUsageData'] = 'basic' c['buildbotNetUsageData'] = 'basic'
# Various # Various
c['db_url'] = "sqlite:///state.sqlite" c['db_url'] = "sqlite:///state.sqlite"
c['title'] = "Blender" c['title'] = "Blender"
c['titleURL'] = "https://builder.blender.org/" #c['titleURL'] = "https://builder.blender.org/"
c['titleURL'] = "http://localhost:8010/"
# Disable sending of 'buildbotNetUsageData' for now, to improve startup time. # Disable sending of 'buildbotNetUsageData' for now, to improve startup time.
c['buildbotNetUsageData'] = None c['buildbotNetUsageData'] = None