Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 13 additions & 10 deletions python/tk_desktop/desktop_engine_site_implementation.py
Original file line number Diff line number Diff line change
Expand Up @@ -416,16 +416,19 @@ def run(self, splash, version, **kwargs):
if self.uses_legacy_authentication():
self._migrate_credentials()

# We need to initialize current login
# We know for sure there is a default user, since either the migration was done
# or we logged in as an actual user with the new installer.
human_user = ShotgunAuthenticator(
# We don't want to get the script user, but the human user, so tell the
# CoreDefaultsManager manager that we are not interested in the script user. Do not use
# the regular shotgun_authentication.DefaultsManager to get this user because it will
# not know about proxy information.
sgtk.util.CoreDefaultsManager(mask_script_user=True)
).get_default_user()
human_user = sgtk.get_authenticated_user()
if not human_user:
# We need to initialize current login
# We know for sure there is a default user, since either the migration was done
# or we logged in as an actual user with the new installer.
human_user = ShotgunAuthenticator(
# We don't want to get the script user, but the human user, so tell the
# CoreDefaultsManager manager that we are not interested in the script user. Do not use
# the regular shotgun_authentication.DefaultsManager to get this user because it will
# not know about proxy information.
sgtk.authentication.CoreDefaultsManager(mask_script_user=True)
).get_default_user()

# Cache the user so we can refresh the credentials before launching a background process
self._user = human_user
# Retrieve the current logged in user information. This will be used when creating
Expand Down