Example #1
0
def getmenus():
   menus = []
   if loginhelper.isLoggedOn():
      menus.append([ "Username: "******"Login", [
         [ 'Login', 'loginform.py' ]
      ]])
   menus.append(['League Results', [
      ['View league group results', 'viewleaguegroupresults.py'],
      ['View league results', 'viewleagueresults.py'],
      ['View match results', 'viewresults.py']
   ]])
   menus.append([ 'League Requests', [
      ['View request queue', 'viewrequests.py'],
      ['View request counts per league', 'showaimatchpaircount.py'],
      ['Schedule matches for league', 'schedulematchesform.py']
   ]])

   menus.append([ 'Configuration', [
      ['Setup notes', 'setupnotes.py'],
      ['View league groups', 'viewleaguegroups.py'],
      ['View leagues', 'viewleagues.py'],
      ['View available maps', 'viewmaps.py'],
      ['View available mods', 'viewmods.py'],
      ['View available ais', 'viewais.py'],
      ['View available options', 'viewoptions.py'],
      ['View accounts', 'viewaccounts.py'],
      ['View global configuration', 'viewconfig.py']
   ]])

   menus.append([ 'Help', [
      ['Architecture','architecture.py'],
      ['About', 'about.py']
   ]])

   return menus
Example #2
0
def getmenus():
   menus = []
   if loginhelper.isLoggedOn():
      menus.append([ "Username: "******"Login", [
         [ 'Login', 'loginform.py' ]
      ]])
   menus.append(['League', [
      ['View league group results', 'viewleaguegroupresults.py'],
      ['View league results', 'viewleagueresults.py'],
      ['View match results', 'viewresults.py']
   ]])
   menus.append([ 'Runner', [
      ['View request queue', 'viewrequests.py'],
      ['Add request to queue', 'submitrequestform.py'],
      ['View request counts per league', 'showaimatchpaircount.py']
   ]])

   menus.append([ 'Configuration', [
      ['Setup notes', 'setupnotes.py'],
      ['View league groups', 'viewleaguegroups.py'],
      ['View leagues', 'viewleagues.py'],
      ['View available bot runners', 'viewbotrunners.py'],
      ['View available maps', 'viewmaps.py'],
      ['View available mods', 'viewmods.py'],
      ['View available ais', 'viewais.py'],
      ['View accounts', 'viewaccounts.py'],
      ['Run website diagnostics', 'diagnostics.py']
   ]])

   menus.append([ 'About', [
      ['About', 'about.py']
   ]])

   return menus
Example #3
0
def getmenus():
   menus = []
   if loginhelper.isLoggedOn():
      accountmenus = []
      if loginhelper.hasPassword():
         accountmenus.append( ['Change Password...', 'changepasswordform.py'] )
      accountmenus.append( ['Logout', 'logout.py'] )
      menus.append([ loginhelper.gusername.split('.')[0], accountmenus ])
   else:
      menus.append(["Login", [
         [ 'Login ...', 'loginform.py' ]
      ]])
   menus.append(['Results', [
      ['View match results', 'viewresults.py']
   ]])
   menus.append([ 'Runner', [
      ['View request queue', 'viewrequests.py'],
      ['Add request to queue...', 'submitrequestform.py'],
      ['Start botrunner instance...', 'startbotrunner.py']
   ]])

   menus.append([ 'Configuration', [
      ['Setup notes', 'setupnotes.py'],
      ['View available bot runners', 'viewbotrunners.py'],
      ['View available maps', 'viewmaps.py'],
      ['View available mods', 'viewmods.py'],
      ['View available ais', 'viewais.py'],
      ['View accounts', 'viewaccounts.py'],
      ['View global config', 'viewconfig.py' ],
      ['Run website diagnostics', 'diagnostics.py']
   ]])

   menus.append([ 'About', [
      ['About', 'about.py']
   ]])

   return menus
Example #4
0
def isInRole(rolename):
   if not loginhelper.isLoggedOn():
      return False
   username = loginhelper.getUsername()
   return isInRole2( username, rolename )
Example #5
0
def isInRole(rolename):
   if not loginhelper.isLoggedOn():
      return False
   username = loginhelper.getUsername()
   return isInRole2( username, rolename )