Compare commits

..

No commits in common. "0dfdf70c45d907c12f94422b18fe4f036baf97e0" and "9d0d0b2686a78a7d3f13aefc7dd00e5f97c287bb" have entirely different histories.

2 changed files with 2 additions and 4 deletions

View File

@ -343,7 +343,7 @@ to ask the user for the username and password again.
Log In Bookkeeping
==================
=================#
You can register a callback to run when the user logs in, for ex.,
logging the log in event, adding the log in counter, etc.
@ -402,7 +402,6 @@ Copyright
See the License for the specific language governing permissions and
limitations under the License.
Authors
=======

View File

@ -110,7 +110,7 @@ class DigestAuth:
class NoLogInException(Exception):
"""The exception thrown when the user is not authorized."""
def get_logged_in_user() -> t.Any:
def get_logged_in_user() -> t.Optional[t.Any]:
"""Returns the currently logged-in user.
:return: The currently logged-in user.
@ -120,7 +120,6 @@ class DigestAuth:
raise NoLogInException
user: t.Optional[t.Any] = self.__get_user(session["user"])
if user is None:
del session["user"]
raise NoLogInException
return user