[users at bb.net] How to add permissions for multiple roles?

Chris Spencer chrisspen at gmail.com
Mon Dec 11 22:48:05 UTC 2017


How do you grant the permission to "rebuild" to multiple groups? I have an
"admin" group with all permissions, but I want to give a "developers" group
this permission as well, but not the other permissions.

So I tried adding `RebuildBuildEndpointMatcher(role="developers")` to my
Authz's allowRules list like:

    authz = util.Authz(
      allowRules=[
        util.StopBuildEndpointMatcher(role="admins"),
        util.ForceBuildEndpointMatcher(role="admins"),
        util.RebuildBuildEndpointMatcher(role="admins"),
        util.RebuildBuildEndpointMatcher(role="developers") # added this
      ],
      roleMatchers=[
        util.RolesFromEmails(admins=["...admin emails..."]),
        util.RolesFromUsername(roles=["admins"], usernames=["...admin
usernames..."]),
        util.RolesFromUsername(roles=["developers"],
usernames=["...developer usernames..."])
      ]
    )

However, when a developer clicks the "Rebuild" they still get the error
about not being an admin.

Why isn't this configuration working?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20171211/83fa2540/attachment.html>


More information about the users mailing list