mirror of
https://github.com/pacnpal/thrilltrack-explorer.git
synced 2025-12-21 05:51:12 -05:00
Implement two-layer CAPTCHA bypass
This commit is contained in:
@@ -78,6 +78,12 @@ export function useAdminSettings() {
|
||||
return settings?.filter(s => s.category === category) || [];
|
||||
};
|
||||
|
||||
const getCaptchaBypassEnabled = (): boolean => {
|
||||
const value = getSettingValue('auth.captcha_bypass_enabled', 'false');
|
||||
const cleanValue = typeof value === 'string' ? value.replace(/"/g, '') : value;
|
||||
return cleanValue === 'true' || cleanValue === true;
|
||||
};
|
||||
|
||||
const updateSetting = async (key: string, value: any) => {
|
||||
return updateSettingMutation.mutateAsync({ key, value });
|
||||
};
|
||||
@@ -179,5 +185,6 @@ export function useAdminSettings() {
|
||||
getAutoRefreshStrategy,
|
||||
getPreserveInteractionState,
|
||||
getUseRealtimeQueue,
|
||||
getCaptchaBypassEnabled,
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user