flake8
-
reviewboard/accounts/tests/test_client_login_view.py (Diff revision 1)
Review Request #13693 — Created April 3, 2024 and submitted
When building the client web login capability in the server info resource,
we would grab theclient_web_login
setting from the site configuration
but use a default value ofFalse
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 isTrue
. 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.
rbt login
to a server that didn't have a client_web_login
Summary | ID |
---|---|
0b5ed02daf65aa0263cdb2109ede76971c830f39 |
Description | From | Last Updated |
---|---|---|
'djblets.db.fields.json_field.JSONDict' imported but unused Column: 5 Error code: F401 |
reviewbot | |
Can we add an assertion at the beginning of this that the key is not present in the siteconfig settings … |
david | |
This says "login" three times in the space of 9 words. I'm not sure we have a real standard here, … |
david | |
Same "login login" problem here. |
david | |
pop is most useful when we want to return the value as part of it. We can instead use del … |
chipx86 | |
We should be able to just check against siteconfig.settings, which will be faster than checking keys(). |
chipx86 |
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+106 -2) |
reviewboard/accounts/tests/test_client_login_view.py (Diff revision 2) |
---|
Can we add an assertion at the beginning of this that the key is not present in the siteconfig settings JSONField?
assertEquals
call because its deprecated.Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+124 -4) |
docs/manual/admin/configuration/authentication-settings.rst (Diff revision 3) |
---|
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 ..." ?
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+122 -4) |
reviewboard/accounts/tests/test_client_login_view.py (Diff revision 4) |
---|
pop
is most useful when we want to return the value as part of it. We can instead usedel siteconfig.settings[...]
.
reviewboard/accounts/tests/test_client_login_view.py (Diff revision 4) |
---|
We should be able to just check against
siteconfig.settings
, which will be faster than checkingkeys()
.
Commits: |
|
|||||||
---|---|---|---|---|---|---|---|---|
Diff: |
Revision 5 (+122 -4) |