Skip to content

Commit

Permalink
Merge pull request #413 from samchecc/access-override
Browse files Browse the repository at this point in the history
Update constants.py
  • Loading branch information
kmcquade authored Feb 1, 2023
2 parents 47e3c83 + fb94b0f commit 11d6bd3
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions policy_sentry/shared/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,16 @@
DATASTORE_FILE_PATH = BUNDLED_DATASTORE_FILE_PATH

# Overrides
BUNDLED_ACCESS_OVERRIDES_FILE = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "data", "access-level-overrides.yml"
)
if "CUSTOM_ACCESS_OVERRIDES_FILE" in os.environ:
CUSTOM_ACCESS_OVERRIDES_FILE=os.environ['CUSTOM_ACCESS_OVERRIDES_FILE']
BUNDLED_ACCESS_OVERRIDES_FILE = os.path.join(
os.path.abspath(os.path.dirname(__file__)), CUSTOM_ACCESS_OVERRIDES_FILE
)

else:
BUNDLED_ACCESS_OVERRIDES_FILE = os.path.join(
os.path.abspath(os.path.dirname(__file__)), "data", "access-level-overrides.yml"
)

LOCAL_ACCESS_OVERRIDES_FILE = os.path.join(
CONFIG_DIRECTORY, "access-level-overrides.yml"
Expand Down

0 comments on commit 11d6bd3

Please sign in to comment.