[Buildbot] #3439: Conflict between GoogleAuth (OAuth) and user info
Buildbot trac
trac at buildbot.net
Fri Apr 29 12:09:22 UTC 2016
#3439: Conflict between GoogleAuth (OAuth) and user info
-------------------+--------------------
Reporter: dustin | Owner:
Type: defect | Status: new
Priority: major | Milestone: 0.9.+
Version: master | Resolution:
Keywords: |
-------------------+--------------------
Comment (by tardyp):
I would indeed opt for adding a updateUserInfo to getUserInfo to, and let
it manage conficts
something like this:
{{{
class UserInfoProviderBase(config.ConfiguredMixin):
name = None
@defer.inlineCallbacks
def updateUserInfo(self, infos):
new_infos = yield self.getUserInfo(infos['username'])
infos.update(new_infos)
return defer.succeed(infos)
def getUserInfo(self, username):
raise NotImplemented
class UserInfoProviderDefault(config.ConfiguredMixin):
name = "noinfo"
def updateUserInfo(self, infos):
if 'email' not in infos:
infos.update({'email': username})
return defer.succeed(infos)
}}}
--
Ticket URL: <http://trac.buildbot.net/ticket/3439#comment:5>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list