Enable or disable @auth_basic() programmatically
问题 I'm trying to use the Bottle framework @auth_basic(check_credentials) decorator within my program but I would like to be able to enable it or disable it based on a choice made by the user in program settings. I've tried to do a if inside the check_credentials to return True if the setting is False but I'm still getting the login popup which is always returning True . I would like to not get the popup at all. Any idea how I could achieve that? def check_credentials(user, pw): if auth_enabled =