-- Customer specific once-script AAFM#32982.sql.
--
-- (c) 2015 Facilitor bv.
SET ECHO ON
SET DEFINE ON
column fcltlogfile new_value fcltlogfile NOPRINT;

SELECT UPPER (USER) || '_AAFM#32982' || '.lst' AS fcltlogfile FROM DUAL;

spool &fcltlogfile
SET DEFINE OFF

DECLARE
   v_user VARCHAR2(200);
   v_guid VARCHAR2(200);
   v_url  VARCHAR2(200);
   v_env  VARCHAR2(200);
BEGIN
   v_user := SUBSTR (UPPER (USER), 1, 4);

   IF UPPER (USER) LIKE '%TEST'
   THEN
      v_env := 'accp';
   ELSE
      v_env := 'prod';
   END IF;

   v_url := 'https://www.aafmintouch.com/SSO' || v_env || v_user || '.asp';

   IF v_user = 'AAAR'
   THEN
      v_guid := '780c865f-47d3-40c2-9990-33591dcb3eea';
   ELSIF v_user = 'AADB'
   THEN
      v_guid := '95bf06b0-eba7-4dee-acaa-6496e152e8c4';
   ELSIF v_user = 'AADO'
   THEN
      v_guid := 'f52f7409-03ae-43f1-a920-96366edd2388';
   ELSIF v_user = 'AADS'
   THEN
      v_guid := 'e2887d83-8cc3-4bcc-9424-1d1b0ba4fc32';
   ELSIF v_user = 'AAEN'
   THEN
      v_guid := 'a8592ce8-2301-4a01-8aba-5c23cc8005af';
   ELSIF v_user = 'AAES'
   THEN
      v_guid := 'b99b5309-a367-4c54-9e57-8862e7d5ba3b';
   ELSIF v_user = 'AAEY'
   THEN
      v_guid := '09933176-ef7f-496c-b4b6-a328facc3fe1';
   ELSIF v_user = 'AAFP'
   THEN
      v_guid := '25bb61b4-d81d-4c88-88e4-0e2a0b279a45';
   ELSIF v_user = 'AAHU'
   THEN
      v_guid := 'a31f87cc-c7da-4579-8288-994309b9860f';
   ELSIF v_user = 'AAIT'
   THEN
      v_guid := '3b7f56e1-1097-4c0f-bdb3-130a974d9df2';
   ELSIF v_user = 'AALB'
   THEN
      v_guid := '1d070bdd-9c6f-45a7-b654-93750ca25cb1';
   ELSIF v_user = 'AANS'
   THEN
      v_guid := '0cbdd3ad-4428-469a-a5c3-9ab71f8626af';
   ELSIF v_user = 'AAPM'
   THEN
      v_guid := '9b877358-7b10-4bfe-ba6a-1b1d866c0e79';
   ELSIF v_user = 'AARW'
   THEN
      v_guid := '077116f7-963f-4eea-a271-43e4cf5adff1';
   ELSIF v_user = 'AASA'
   THEN
      v_guid := '9dc09534-ca91-4132-a3eb-28f62c40a600';
   ELSIF v_user = 'AASI'
   THEN
      v_guid := 'b7d0cd62-8e82-44a8-a3d4-73eae3be2b10';
   ELSIF v_user = 'AAVL'
   THEN
      v_guid := '2500f67e-f106-4dd2-827d-407171f24e18';
   ELSIF v_user = 'AAZC'
   THEN
      v_guid := 'daaf57c2-1139-4a4a-9d37-59130dc0a306';
   ELSIF v_user = 'GULU'
   THEN
      v_guid := '33ea3850-9758-426a-a835-ee614e756bf4';
   ELSIF v_user = 'NMMS'
   THEN
      v_guid := 'df96620b-33e5-41bf-9414-e9e897479037';
   END IF;

   UPDATE fac_setting
      SET fac_setting_pvalue = v_url
    WHERE fac_setting_name = 'sso_advanced_url_alt';


   UPDATE fac_setting
      SET fac_setting_pvalue = v_guid
    WHERE fac_setting_name = 'sso_advanced_secret_alt';

   COMMIT;
END;
/

COMMIT;

BEGIN
   adm.systrackscriptid (
      '$Id$');
END;
/

SPOOL OFF
QUIT