Skip to content

Commit

Permalink
fix issue with first-time api client permission toggling
Browse files Browse the repository at this point in the history
  • Loading branch information
jertel committed Jan 22, 2025
1 parent 704e302 commit db93877
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions salt/manager/sync_es_users.sls
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,11 @@ sync_es_users:
- /opt/so/saltstack/local/salt/elasticsearch/files/users
- /opt/so/saltstack/local/salt/elasticsearch/files/users_roles
- /opt/so/conf/soc/soc_users_roles
- /opt/so/conf/soc/soc_clients_roles
- show_changes: False
- require:
- docker_container: so-kratos
- http: wait_for_kratos
- file: so-user.lock # require so-user.lock file to be missing
- file: so-client.lock # require so-client.lock file to be missing

# we dont want this added too early in setup, so we add the onlyif to verify 'startup_states: highstate'
# is in the minion config. That line is added before the final highstate during setup
Expand Down
2 changes: 1 addition & 1 deletion salt/manager/tools/sbin/so-client
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function createFile() {
}

function ensureRoleFileExists() {
if [[ ! -f "$socRolesFile" || ! -s "$socRolesFile" ]]; then
if [[ ! -f "$socRolesFile" ]]; then
# Generate the new roles file
rolesTmpFile="${socRolesFile}.tmp"
createFile "$rolesTmpFile" "$soUID" "$soGID"
Expand Down

0 comments on commit db93877

Please sign in to comment.