Display the correct value for the client web login server capability and add docs.

Review Request #13693 — Created April 3, 2024 and submitted

Information

Review Board
release-5.0.x

Reviewers

When building the client web login capability in the server info resource,
we would grab the client_web_login setting from the site configuration
but use a default value of False if the setting doesn't exist in the site
configuration. We should actually be using the default value that is set in
siteconfig.py, which is True. This change fixes that.

This change also adds documentation that explains how certain services can
authenticate to Review Board via the login page and that API tokens will be
automatically created for them. We also add docs for the automatic token
expiration setting that was added in the admin authentication page.

  • Tested rbt login to a server that didn't have a client_web_login
    setting in site config, saw that it defaulted to web-based login.
  • Built and viewed the docs that I added.
  • Ran unit tests.
Summary ID
Display the correct value for the client web login server capability.
0b5ed02daf65aa0263cdb2109ede76971c830f39
Description From Last Updated

'djblets.db.fields.json_field.JSONDict' imported but unused Column: 5 Error code: F401

reviewbotreviewbot

Can we add an assertion at the beginning of this that the key is not present in the siteconfig settings …

daviddavid

This says "login" three times in the space of 9 words. I'm not sure we have a real standard here, …

daviddavid

Same "login login" problem here.

daviddavid

pop is most useful when we want to return the value as part of it. We can instead use del …

chipx86chipx86

We should be able to just check against siteconfig.settings, which will be faster than checking keys().

chipx86chipx86
Checks run (1 failed, 1 succeeded)
flake8 failed.
JSHint passed.

flake8

maubin
david
  1. 
      
  2. Show all issues

    Can we add an assertion at the beginning of this that the key is not present in the siteconfig settings JSONField?

  3. 
      
maubin
david
  1. 
      
  2. Show all issues

    This says "login" three times in the space of 9 words.

    I'm not sure we have a real standard here, but my personal inclination is that we should use "login" as a noun/adjective, and "log in" as a verb.

    So perhaps something like "... directing the user to log in via the web site. Upon successful authentication, the API token ..." ?

  3. Show all issues

    Same "login login" problem here.

  4. 
      
maubin
david
  1. Ship It!
  2. 
      
chipx86
  1. 
      
  2. Show all issues

    pop is most useful when we want to return the value as part of it. We can instead use del siteconfig.settings[...].

  3. Show all issues

    We should be able to just check against siteconfig.settings, which will be faster than checking keys().

  4. 
      
maubin
maubin
  1. A congratulatory header

  2. 
      
david
  1. Ship It!
  2. 
      
maubin
  1. 
      
  2. Howdy

  3. 
      
maubin
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-5.0.x (6cd8bd2)
Loading...