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
ivan@13377
     1
<?xml version="1.0"?>
ivan@13377
     2
  <database name="FUNCTION OBSEIG_UPDATE_ACCESS">
ivan@13377
     3
    <function name="OBSEIG_UPDATE_ACCESS" type="NULL">
ivan@13377
     4
      <parameter name="p_ep_instance_id" type="VARCHAR" mode="in">
ivan@13377
     5
        <default/>
ivan@13377
     6
      </parameter>
ivan@13377
     7
      <body><![CDATA[/*************************************************************************
ivan@13377
     8
* The contents of this file are subject to the Openbravo  Public  License
ivan@13377
     9
* Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
ivan@13377
    10
* Version 1.1  with a permitted attribution clause; you may not  use this
ivan@13377
    11
* file except in compliance with the License. You  may  obtain  a copy of
ivan@13377
    12
* the License at http://www.openbravo.com/legal/license.html
ivan@13377
    13
* Software distributed under the License  is  distributed  on  an "AS IS"
ivan@13377
    14
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
ivan@13377
    15
* License for the specific  language  governing  rights  and  limitations
ivan@13377
    16
* under the License.
ivan@13377
    17
* The Original Code is Openbravo ERP.
ivan@13377
    18
* The Initial Developer of the Original Code is Openbravo SLU
ivan@13377
    19
* All portions are Copyright (C) 2011 Openbravo SLU
ivan@13377
    20
* All Rights Reserved.
ivan@13377
    21
* Contributor(s):  ______________________________________.
ivan@13377
    22
************************************************************************/
ivan@13377
    23
ivan@13377
    24
BEGIN
ivan@13377
    25
ivan@13377
    26
  INSERT INTO OBUIAPP_View_Role_Access
ivan@13377
    27
    (
ivan@13377
    28
      OBUIAPP_View_Role_Access_ID, OBUIAPP_View_Impl_ID, AD_Role_ID, AD_Client_ID,
ivan@13377
    29
      AD_Org_ID, IsActive, Created,
ivan@13377
    30
      CreatedBy, Updated, UpdatedBy
ivan@13377
    31
    )
ivan@13377
    32
  SELECT get_uuid(), V.OBUIAPP_View_Impl_ID, R.AD_ROLE_ID, R.AD_CLIENT_ID,
ivan@13377
    33
    R.AD_ORG_ID, 'Y', now(),
ivan@13377
    34
    '0', now(), '0'
ivan@13377
    35
  FROM OBUIAPP_View_Impl V, AD_Role R
ivan@13377
    36
  WHERE R.isManual = 'N'
ivan@13377
    37
  AND V.isActive = 'Y'
ivan@13377
    38
  AND V.AD_Module_ID = 'FF8080813129ADA401312CA1222A0005'
ivan@13377
    39
    AND NOT EXISTS (SELECT 1
ivan@13377
    40
                     FROM OBUIAPP_View_Role_Access
ivan@13377
    41
                    WHERE OBUIAPP_View_Impl_ID = V.OBUIAPP_View_Impl_ID
ivan@13377
    42
                      AND AD_ROLE_ID = R.AD_ROLE_ID);
ivan@13377
    43
END OBSEIG_UPDATE_ACCESS
ivan@13377
    44
]]></body>
ivan@13377
    45
    </function>
ivan@13377
    46
  </database>