mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 02:02:13 -05:00
code review feedback remove ability to run on higher tiers
This commit is contained in:
@@ -1058,11 +1058,8 @@ def add_test_users_to_db(generate, state, admin):
|
|||||||
# generate a new salt value
|
# generate a new salt value
|
||||||
@notify_command(name="generate-salt")
|
@notify_command(name="generate-salt")
|
||||||
def generate_salt():
|
def generate_salt():
|
||||||
|
if getenv("NOTIFY_ENVIRONMENT", "") not in ["development", "test"]:
|
||||||
|
current_app.logger.error("Can only be run in development")
|
||||||
|
return
|
||||||
salt = secrets.token_hex(16)
|
salt = secrets.token_hex(16)
|
||||||
# We want to print here. This value is
|
|
||||||
# generated locally for the developer doing
|
|
||||||
# the salt rotation task, so we don't care if
|
|
||||||
# the task is somehow run on production tier and
|
|
||||||
# appears in the logs, because that will not be
|
|
||||||
# the correct value.
|
|
||||||
print(salt)
|
print(salt)
|
||||||
|
|||||||
Reference in New Issue
Block a user