• 
      

    Make UserSession always available, and move global variables to it.

    Review Request #4045 — Created April 13, 2013 and submitted

    Information

    Review Board
    master

    Reviewers

    Make UserSession always available, and move global variables to it.
    
    UserSession is now instantiated whether or not the user is
    authenticated. An 'authenticated' attribute is set to indicate the
    authentication state.
    
    Along with this, some global variables used for user state (gUserName,
    gUserFullName, gUserURL, and gOpenAnIssue) are now part of the
    UserSession.
    
    This required some updates to various unit tests in order to not trip
    the asserts for an existing UserSession.
    
    A side benefit to this work is that unit tests can now be run reliably
    regardless of whether the tester is logged in (as some code would check
    JavaScript variables that weren't set for anonymous users).
    Ran unit tests when both logged in and out.
    
    Went throughout the UI (again, both when logged in, and out) and made sure
    everything touching the prefs seemed to work. This included the Open An Issue
    checkbox default and the user information on new comments (username, full name, URL).
    reviewbot
    1. This is a review from Review Bot.
        Tool: PEP8 Style Checker
        Processed Files:
        Ignored Files:
          reviewboard/static/rb/js/views/tests/commentDialogViewTests.js
          reviewboard/static/rb/js/models/tests/reviewGroupModelTests.js
          reviewboard/templates/base.html
          reviewboard/templates/js/tests.html
          reviewboard/static/rb/js/models/tests/userSessionModelTests.js
          reviewboard/static/rb/js/models/commentEditorModel.js
          reviewboard/static/rb/js/reviews.js
          reviewboard/static/rb/js/models/tests/reviewRequestModelTests.js
          reviewboard/templates/reviews/reviewable_base.html
          reviewboard/static/rb/js/models/userSessionModel.js
          reviewboard/static/rb/js/models/tests/commentEditorModelTests.js
      
      
    2. 
        
    david
    1. Ship It!
    2. 
        
    chipx86
    Review request changed
    Status:
    Completed