Fix for __get_or_create_remote_user, show an error message if the user's account has been deleted instead of automatically undeleting it.

This commit is contained in:
Greg Von Kuster
2008-12-12 14:56:35 -05:00
parent dbf2479cc8
commit 394c26fa1f
+1 -12
View File
@@ -300,19 +300,8 @@ class UniverseWebTransaction( base.DefaultWebTransaction ):
user = self.app.model.User( email=remote_user_email )
user.set_password_cleartext( 'external' )
user.external = True
#self.log_event( "Automatically created account '%s'", user.email )
# TODO: make sure this correctly handles deleted / purged users
elif user.deleted:
if user.purged:
# If the user has been purged, all associations have been deleted except for the private role
# and the DefaultUserPermissions and DefaultHistoryPermissions associated with it. We'll
# restore the user, but all of their previous histories and other associations will have been
# deleted.
user.purged = False
# If the user was not purged, the state of all of their associations at the time they were deleted
# will have been preserved.
user.deleted = False
user.flush()
return self.show_error_message( "Your account is no longer valid, contact your Galaxy administrator to activate your account." )
return user
def __update_session_cookie( self ):
"""