Esempio n. 1
0
def logOutPavlovia(parent, event=None):
    """Opens the built-in browser dialog to login to pavlovia

    Returns
    -------
    None (user closed window without logging on) or a gitlab.User object
    """
    # also log out of gitlab session in python
    pavlovia.logout()
    # create minibrowser so we can logout of the session
    dlg = PavloviaMiniBrowser(parent=parent, logoutOnly=True)
    dlg.logout()
    dlg.Destroy()
Esempio n. 2
0
def logOutPavlovia(parent, event=None):
    """Opens the built-in browser dialog to login to pavlovia

    Returns
    -------
    None (user closed window without logging on) or a gitlab.User object
    """
    # also log out of gitlab session in python
    pavlovia.logout()
    # create minibrowser so we can logout of the session
    dlg = PavloviaMiniBrowser(parent=parent, logoutOnly=True)
    dlg.logout()
    dlg.Destroy()
Esempio n. 3
0
        def onSelectUser(evt):
            # Get user from menu
            id = evt.Id
            menu = evt.EventObject
            user = menu.users[id]
            # Logout
            pavlovia.logout()
            # Log back in as new user
            pavlovia.login(user['username'])
            # Update view
            self.user = pavlovia.getCurrentSession().user
            # Update cache
            prefs.appData['projects']['pavloviaUser'] = user['username']

            self.Layout()  # update the size of the button
            self.Fit()