~linuxgoose/bocpress

5204e11e63274f2b2f18a72cc43925cfc58d32ed — Jordan Robinson 4 months ago 7aed0b0
fix user update form to account for allow_docs_user env variable
1 files changed, 7 insertions(+), 1 deletions(-)

M main/util.py
M main/util.py => main/util.py +7 -1
@@ 24,7 24,13 @@ def is_disallowed(username):
    if username[0] == "_":
        # do not allow leading underscores
        return True
    return username in denylist.DISALLOWED_USERNAMES
    
    if username == "docs" and settings.ALLOW_DOCS_USER:
        return False

    # check if subdomain is disallowed
    if username in denylist.DISALLOWED_USERNAMES and not settings.ALLOW_DOCS_USER:
        return username in denylist.DISALLOWED_USERNAMES


def get_approx_number(number):