On 07/07/17 10:47, Pierre Tardy wrote: > Hi Paulo, > > This is not something that is supported by current code.
By 'This' you mean disabling anonymous access? > You can create > a custom matcher like this one: > > class RoleFromAnyEmail(RolesFromEmails): > > def getRolesFromUser(self, userDetails): > if 'email' in userDetails: > return ["logged_in"] > return [] > That seems to work. Thanks. > Pierre > > On Fri, Jul 7, 2017 at 10:18 AM Paulo Matos <[email protected]> wrote: > > Hi, > > I was looking at the example in the manual: > from buildbot.plugins import * > authz = util.Authz( > allowRules=[ > util.AnyControlEndpointMatcher(role="admins"), > ], > roleMatchers=[ > util.RolesFromEmails(admins=["[email protected] > <mailto:[email protected]>"]) > ] > ) > auth=util.UserPasswordAuth({'[email protected] <mailto:[email protected]>': > 'mypass'}) > c['www']['auth'] = auth > c['www']['authz'] = authz > > > I tried doing instead to match all emails in a domain: > util.RolesFromEmails(admins=["*@email.com <http://email.com>"]) > > but it doesn't seem to work. Is there a way to do something like this? > Also, how can I disable anonymous access, i.e. an anonymous user cannot > see anything but a blank slate until it performs a logon with an email > from email.com <http://email.com>? > > -- > Paulo Matos > _______________________________________________ > users mailing list > [email protected] <mailto:[email protected]> > https://lists.buildbot.net/mailman/listinfo/users > -- Paulo Matos _______________________________________________ users mailing list [email protected] https://lists.buildbot.net/mailman/listinfo/users
