@profiler.trace
def roles_for_user(request, user, project=None, domain=None):
 manager = keystoneclient(request, admin=True).roles
 if (VERSIONS.active < 3):
  return manager.roles_for_user(user, project)
 else:
  return manager.list(user=user, domain=domain, project=project)

@ profiler . trace def roles_for_user ( request , user , project = None , domain = None ) : manager = keystoneclient ( request , admin = True ) . roles if ( VERSIONS . active < 3 ) : return manager . roles_for_user ( user , project ) else : return manager . list ( user = user , domain = domain , project = project )
returns a list of user roles scoped to a project or domain .