Skip to content

Commit

Permalink
Merge pull request #125 from okfn/api_token_expire_for_ckan_10_dev
Browse files Browse the repository at this point in the history
Api token expire for ckan 10 dev
  • Loading branch information
avdata99 authored Aug 15, 2023
2 parents 3eb5a72 + 18ffa2a commit 0b59fef
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion ckan-base/2.10/setup/start_ckan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ else
TOKEN_EXTRAS=""
fi

expires_in=30 unit=4
echo "Set up ckan.datapusher.api_token"
ckan config-tool $CKAN_INI "ckan.datapusher.api_token=$(ckan -c $CKAN_INI user token add ckan_admin datapusher $TOKEN_EXTRAS | tail -n 1 | tr -d '\t')"

Expand Down
2 changes: 1 addition & 1 deletion ckan-dev/2.10/setup/start_ckan_development.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ sudo -u ckan -EH python3 prerun.py

# Set a proper value for ckan.datapusher.api_token now that that an admin user exists
echo "Set up ckan.datapusher.api_token"
ckan config-tool $CKAN_INI "ckan.datapusher.api_token=$(ckan -c $CKAN_INI user token add ckan_admin datapusher | tail -n 1 | tr -d '\t')"
ckan config-tool $CKAN_INI "ckan.datapusher.api_token=$(ckan -c $CKAN_INI user token add ckan_admin datapusher expires_in=365 unit=4 | tail -n 1 | tr -d '\t')"

# Run any startup scripts provided by images extending this one
if [[ -d "/docker-entrypoint.d" ]]
Expand Down

0 comments on commit 0b59fef

Please sign in to comment.