[users at bb.net] Cannot Stop: you need to have role 'admins'

Chris Spencer chrisspen at gmail.com
Fri Feb 24 15:34:32 UTC 2017


No, I'm still unable to perform any actions. The "user" section on the
about page shows that it's reading the basic auth credentials, although it
looks like it's mangling my login.

I'm using myusername at mydomain.com to login, but Buildbot user section shows:

username   myusername
realm         mydomain.com
email         myusername

Presumably, it's blocking me because my config has an email address, but
it's effectively checking with a username.

I'll try the RolesFromUsername class.

On Fri, Feb 24, 2017 at 7:23 AM, Pierre Tardy <tardyp at gmail.com> wrote:
>
> Hi Chris,
> Did you resolve this issue?
> I am not sure if email property is populated by default if you are using
solely RemoteUserAuth.
> You might need to implement or use an existing user info provider.
> http://docs.buildbot.net/latest/manual/cfg-www.html#user-information
>
> Perhaps using RolesFromUsername might help as well.
>
http://docs.buildbot.net/latest/manual/cfg-www.html#buildbot.www.authz.roles.RolesFromUsername
>
> You can see in the about page more details about what user information
has been set by your authentication plugins
> e.g. http://nine.buildbot.net/#/about
>
>
>
> On Tue, Feb 21, 2017 at 4:54 AM Chris Spencer <chrisspen at gmail.com> wrote:
>>
>> How do you grant your user the ability to stop/resume builds?
>>
>> I'm able to login using "myusername at mydomain.com", and Buildbot shows an
icon for my user with a logout link, but when I try to stop a build, I get
the error message:
>>
>>     Cannot Stop: you need to have role 'admins'
>>
>> My auth setup looks like:
>>
>>     authz = util.Authz(
>>       allowRules=[
>>         util.StopBuildEndpointMatcher(role="admins"),
>>         util.ForceBuildEndpointMatcher(role="admins"),
>>         util.RebuildBuildEndpointMatcher(role="admins")
>>       ],
>>       roleMatchers=[
>>         util.RolesFromEmails(admins=["myusername at mydomain.com"])
>>       ]
>>     )
>>     c['www'] = dict(
>>         port=8010,
>>         plugins=dict(waterfall_view={}, console_view={}),
>>         auth=util.RemoteUserAuth(),
>>         authz=authz,
>>     )
>>
>> What am I doing wrong?
>> _______________________________________________
>> users mailing list
>> users at buildbot.net
>> https://lists.buildbot.net/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20170224/b0b8c3f1/attachment.html>


More information about the users mailing list