Repository navigation
Fix authentication toggles persistence bug in God Mode - #3
Conversation
- Added missing configuration keys (IS_GOOGLE_ENABLED, IS_GITHUB_ENABLED, IS_GITLAB_ENABLED) to the backend's known configuration variables. - Updated InstanceConfigurationEndpoint's patch method to use update_or_create for known keys, ensuring that even missing configuration records are created when toggled in the UI. - Refactored the configure_instance management command to consistently initialize all configuration variables, including the authentication toggles, and to preserve backward-compatible auto-enabling if client credentials are provided via environment variables. This fix addresses the bug where toggling authentication methods in the God Mode panel did not persist their state to the database, causing them to reset upon page refresh. Co-authored-by: codecsrayo <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- Added missing configuration keys (IS_GOOGLE_ENABLED, IS_GITHUB_ENABLED, IS_GITLAB_ENABLED) to the backend's known configuration variables. - Updated InstanceConfigurationEndpoint's patch method to use update_or_create for known keys, ensuring that even missing configuration records are created when toggled in the UI. - Refactored the configure_instance management command to consistently initialize all configuration variables, including the authentication toggles, and to preserve backward-compatible auto-enabling if client credentials are provided via environment variables. This fix addresses the bug where toggling authentication methods in the God Mode panel did not persist their state to the database, causing them to reset upon page refresh. Co-authored-by: codecsrayo <[email protected]>
af80b15
into
feature/integrations-panel-fix-17593507967815292912
…Error, URL encoding, useMemo→useCallback #3 — setInterval sin cleanup: - Extraído interval ID a intervalRef (useRef) en lugar de variable local - Añadido useEffect de unmount que llama clearInterval(intervalRef.current) - Patrón idéntico al ya usado en personal-connect-card.tsx:58,76-81 #4 — popup.current.closed sin try/catch: - Envuelto el acceso a popup.current.closed en try/catch - SecurityError en popup cross-origin ahora se trata como 'closed' - El guard === undefined previo no cubría el throw #5 — URLs construidas sin encodeURIComponent: - workspaceSlug, projectId y stateParams ahora se encodean antes de inyectarse en el parámetro state= - Slug con &, #, = o espacios ya no corrompe el parseo del callback - Nonce (UUID, url-safe) también encodificado defensivamente - slackChannelState construido con variables intermedias encodificadas #6 — useMemo retornando función: - Cambiado useMemo(() => (nonce) => ...) → useCallback((nonce) => ...) - Eliminado el eslint-disable-next-line innecesario (deps estaban completas) - Import: reemplazado useMemo por useCallback
The bug where authentication toggles (Google, GitHub, GitLab, etc.) in the God Mode panel changed in the UI but did not persist in the database was caused by two main issues:
configure_instancemanagement command had a logic error that skipped initializing several authentication keys if others were already present.This PR fixes these issues by:
apps/api/plane/utils/instance_config_variables/core.py.patchmethod inapps/api/plane/license/api/views/configuration.pyto useupdate_or_create.apps/api/plane/license/management/commands/configure_instance.pyfor reliable initialization.PR created automatically by Jules for task 17770788961305901682 started by @codecsrayo