Prevent token manager auth swap and fix docker agent perms (Related to #740)

This commit is contained in:
rcourtman 2025-11-22 07:18:42 +00:00
parent 5360f05bdd
commit bbbb417b01
4 changed files with 3 additions and 6 deletions

View file

@ -5,7 +5,6 @@ import { formatRelativeTime } from '@/utils/format';
import { useWebSocket } from '@/App';
import type { DockerHost, Host } from '@/types/api';
import { showTokenReveal, useTokenRevealState } from '@/stores/tokenReveal';
import { setApiToken as setApiClientToken } from '@/utils/apiClient';
import { logger } from '@/utils/logger';
import { Card } from '@/components/shared/Card';
import { SectionHeader } from '@/components/shared/SectionHeader';
@ -262,8 +261,6 @@ export const APITokenManager: Component<APITokenManagerProps> = (props) => {
});
showSuccess('New API token generated. Copy it below while it is still visible.');
props.onTokensChanged?.();
setApiClientToken(token);
} catch (err) {
logger.error('Failed to generate API token', err);
showError('Failed to generate API token');

View file

@ -515,7 +515,7 @@ download_agent() {
fi
mv "$tmp" "$AGENT_PATH"
chmod +x "$AGENT_PATH"
chmod 0755 "$AGENT_PATH"
log_success "Agent installed at $AGENT_PATH"
}

View file

@ -875,7 +875,7 @@ if [[ -n "${AGENT_DOWNLOAD_SOURCE:-}" ]]; then
fi
if ! common::is_dry_run; then
chmod +x "$AGENT_PATH"
chmod 0755 "$AGENT_PATH"
fi
log_success "Agent binary installed"

View file

@ -1745,7 +1745,7 @@ if [[ -n "$DOWNLOAD_SUCCESS_URL" ]]; then
fi
fi
chmod +x "$AGENT_PATH"
chmod 0755 "$AGENT_PATH"
log_success "Agent binary installed"
allow_reenroll_if_needed() {