From 77be4d33a26fd194deb348a2ffe8f1bf123edf8c Mon Sep 17 00:00:00 2001 From: James Tanner Date: Wed, 4 Oct 2023 14:56:34 -0400 Subject: [PATCH] checkin --- dev/scripts.commnunity/fix_social_users.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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}')