modules/org.openbravo.service.integration.google/src-db/database/model/functions/OBSEIG_UPDATE_ACCESS.xml
author Iván Perdomo <ivan.perdomo@openbravo.com>
Mon, 01 Aug 2011 19:46:56 +0200
changeset 13377 061e041754e6
child 14255 15d911f25076
permissions -rw-r--r--
Fixes issue 18077: Added support for login in with Google Account
<?xml version="1.0"?>
  <database name="FUNCTION OBSEIG_UPDATE_ACCESS">
    <function name="OBSEIG_UPDATE_ACCESS" type="NULL">
      <parameter name="p_ep_instance_id" type="VARCHAR" mode="in">
        <default/>
      </parameter>
      <body><![CDATA[/*************************************************************************
* The contents of this file are subject to the Openbravo  Public  License
* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
* Version 1.1  with a permitted attribution clause; you may not  use this
* file except in compliance with the License. You  may  obtain  a copy of
* the License at http://www.openbravo.com/legal/license.html
* Software distributed under the License  is  distributed  on  an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific  language  governing  rights  and  limitations
* under the License.
* The Original Code is Openbravo ERP.
* The Initial Developer of the Original Code is Openbravo SLU
* All portions are Copyright (C) 2011 Openbravo SLU
* All Rights Reserved.
* Contributor(s):  ______________________________________.
************************************************************************/

BEGIN

  INSERT INTO OBUIAPP_View_Role_Access
    (
      OBUIAPP_View_Role_Access_ID, OBUIAPP_View_Impl_ID, AD_Role_ID, AD_Client_ID,
      AD_Org_ID, IsActive, Created,
      CreatedBy, Updated, UpdatedBy
    )
  SELECT get_uuid(), V.OBUIAPP_View_Impl_ID, R.AD_ROLE_ID, R.AD_CLIENT_ID,
    R.AD_ORG_ID, 'Y', now(),
    '0', now(), '0'
  FROM OBUIAPP_View_Impl V, AD_Role R
  WHERE R.isManual = 'N'
  AND V.isActive = 'Y'
  AND V.AD_Module_ID = 'FF8080813129ADA401312CA1222A0005'
    AND NOT EXISTS (SELECT 1
                     FROM OBUIAPP_View_Role_Access
                    WHERE OBUIAPP_View_Impl_ID = V.OBUIAPP_View_Impl_ID
                      AND AD_ROLE_ID = R.AD_ROLE_ID);
END OBSEIG_UPDATE_ACCESS
]]></body>
    </function>
  </database>