"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "keystone/identity/shadow_backends/sql.py" between
keystone-17.0.0.tar.gz and keystone-18.0.0.tar.gz

About: OpenStack Keystone (Core Service: Identity) provides an authentication and authorization service for other OpenStack services. Provides a catalog of endpoints for all OpenStack services.
The "Victoria" series (latest release).

sql.py  (keystone-17.0.0):sql.py  (keystone-18.0.0)
skipping to change at line 231 skipping to change at line 231
def add_user_to_group_expires(self, user_id, group_id): def add_user_to_group_expires(self, user_id, group_id):
def get_federated_user(): def get_federated_user():
with sql.session_for_read() as session: with sql.session_for_read() as session:
query = session.query(model.FederatedUser) query = session.query(model.FederatedUser)
query = query.filter_by(user_id=user_id) query = query.filter_by(user_id=user_id)
user = query.first() user = query.first()
if not user: if not user:
# Note(knikolla): This shouldn't really ever happen, since # Note(knikolla): This shouldn't really ever happen, since
# this requires the user to already be logged in. # this requires the user to already be logged in.
raise exception.UserNotFound() raise exception.UserNotFound(user_id=user_id)
return user return user
with sql.session_for_write() as session: with sql.session_for_write() as session:
user = get_federated_user() user = get_federated_user()
query = session.query(model.ExpiringUserGroupMembership) query = session.query(model.ExpiringUserGroupMembership)
query = query.filter_by(user_id=user_id) query = query.filter_by(user_id=user_id)
query = query.filter_by(group_id=group_id) query = query.filter_by(group_id=group_id)
membership = query.first() membership = query.first()
if membership: if membership:
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)