Bug fix: users loose their project groups after getting role.
The badger service erased the user's groups when assigning subscriber group membership.
This commit is contained in:
@@ -80,7 +80,7 @@ def badger():
|
||||
return 'Role not allowed', 403
|
||||
|
||||
# Fetch the user
|
||||
db_user = users_coll.find_one({'email': user_email}, projection={'roles': 1})
|
||||
db_user = users_coll.find_one({'email': user_email}, projection={'roles': 1, 'groups': 1})
|
||||
if db_user is None:
|
||||
log.warning('badger(%s, %s, %s): user not found', action, user_email, role)
|
||||
return 'User not found', 404
|
||||
|
Reference in New Issue
Block a user