##// END OF EJS Templates
auth: add more login when performing sync of user groups.
marcink -
r2142:a23a4299 default
parent child Browse files
Show More
@@ -472,6 +472,7 b' class RhodeCodeExternalAuthPlugin(RhodeC'
472 472 # at this point _authenticate calls plugin's `auth()` function
473 473 auth = super(RhodeCodeExternalAuthPlugin, self)._authenticate(
474 474 userobj, username, passwd, settings, **kwargs)
475
475 476 if auth:
476 477 # maybe plugin will clean the username ?
477 478 # we should use the return value
@@ -540,6 +541,9 b' class RhodeCodeExternalAuthPlugin(RhodeC'
540 541 # field
541 542 try:
542 543 groups = auth['groups'] or []
544 log.debug(
545 'Performing user_group sync based on set `%s` '
546 'returned by this plugin', groups)
543 547 UserGroupModel().enforce_groups(user, groups, self.name)
544 548 except Exception:
545 549 # for any reason group syncing fails, we should
@@ -593,7 +597,10 b' def authenticate(username, password, env'
593 597 headers_only = environ and not (username and password)
594 598
595 599 authn_registry = get_authn_registry(registry)
596 for plugin in authn_registry.get_plugins_for_authentication():
600 plugins_to_check = authn_registry.get_plugins_for_authentication()
601 log.debug('Starting ordered authentication chain using %s plugins',
602 plugins_to_check)
603 for plugin in plugins_to_check:
597 604 plugin.set_auth_type(auth_type)
598 605 plugin.set_calling_scope_repo(acl_repo_name)
599 606
General Comments 0
You need to be logged in to leave comments. Login now