コード例 #1
0
def create_application(debug):
    replication.configure_as_primary()
    rest_api.set_config_locked(config.is_remote_configured)

    # Configure UI appearance, add all custom tabs.
    ui.configure_ui(app_name='Auth Service',
                    ui_tabs=[
                        ui.GroupsHandler,
                        ui.ChangeLogHandler,
                        ui.LookupHandler,
                        ServicesHandler,
                        ui.OAuthConfigHandler,
                        ui.IPWhitelistsHandler,
                        ConfigHandler,
                        ui.ApiDocHandler,
                    ],
                    ui_data_callback=get_additional_ui_data)
    template.bootstrap({'auth_service': TEMPLATES_DIR})

    # Add a fake admin for local dev server.
    if utils.is_local_dev_server():
        auth.bootstrap_group(
            auth.ADMIN_GROUP,
            [auth.Identity(auth.IDENTITY_USER, '*****@*****.**')],
            'Users that can manage groups')
    return webapp2.WSGIApplication(get_routes(), debug=debug)
コード例 #2
0
ファイル: handlers_frontend.py プロジェクト: rmistry/luci-py
def create_application(debug):
  replication.configure_as_primary()
  rest_api.set_config_locked(config.is_remote_configured)

  # Configure UI appearance, add all custom tabs.
  ui.configure_ui(
      app_name='Auth Service',
      ui_tabs=[
        ui.GroupsHandler,
        ui.ChangeLogHandler,
        ServicesHandler,
        ui.OAuthConfigHandler,
        ui.IPWhitelistsHandler,
        ConfigHandler,
      ],
      env_callback=get_additional_ui_environment)
  template.bootstrap({'auth_service': TEMPLATES_DIR})

  # Add a fake admin for local dev server.
  if utils.is_local_dev_server():
    auth.bootstrap_group(
        auth.ADMIN_GROUP,
        [auth.Identity(auth.IDENTITY_USER, '*****@*****.**')],
        'Users that can manage groups')
  return webapp2.WSGIApplication(get_routes(), debug=debug)
コード例 #3
0
def create_application(debug):
  replication.configure_as_primary()

  # Configure UI appearance, add all custom tabs.
  ui.configure_ui(
      app_name='Auth Service',
      ui_tabs=[
        # Standard tabs provided by auth component.
        ui.GroupsHandler,
        ui.OAuthConfigHandler,
        ui.IPWhitelistsHandler,
        # Additional tabs available only on auth service.
        ConfigHandler,
        ServicesHandler,
      ])
  template.bootstrap({'auth_service': TEMPLATES_DIR})

  # Add a fake admin for local dev server.
  if utils.is_local_dev_server():
    auth.bootstrap_group(
        auth.ADMIN_GROUP,
        [auth.Identity(auth.IDENTITY_USER, '*****@*****.**')],
        'Users that can manage groups')
  return webapp2.WSGIApplication(get_routes(), debug=debug)