mirror of
https://github.com/rcourtman/Pulse.git
synced 2026-05-11 21:28:15 +00:00
Prevent token manager auth swap and fix docker agent perms (Related to #740)
This commit is contained in:
parent
5360f05bdd
commit
bbbb417b01
4 changed files with 3 additions and 6 deletions
|
|
@ -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');
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue