diff --git a/dev/scripts.commnunity/fix_social_users.py b/dev/scripts.commnunity/fix_social_users.py index c8cd079f33..e1e92cc33e 100644 --- a/dev/scripts.commnunity/fix_social_users.py +++ b/dev/scripts.commnunity/fix_social_users.py @@ -1,6 +1,7 @@ from django.contrib.auth import get_user_model from social_django.models import UserSocialAuth +from galaxy_ng.app.utils import rbac from galaxy_ng.app.utils.galaxy import generate_unverified_email @@ -54,3 +55,12 @@ print(f'\t FIX - set email to empty string') continue + # proably shouldn't be here if no sync users found? + if not synced_users: + continue + + synced_user = sycned_users[0] + + # does the synced user have content? + namespaces = rbac.get_owned_v3_namespaces(synced_user) + print(f'\t{synced_user.id} owns {namespaces}')