SHARE
TWEET

@lulzseceurope cancer.gov

a guest Oct 30th, 2012 528 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. OMG #LULZ
  2. @LULZSECEUROPE
  3.  
  4. CANCER.GOV BECAUSE WE LOVE YOU GOVERNMENT <3
  5.  
  6.  
  7. =======================================================================================
  8.  
  9. insert into CSM_APPLICATION(APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,UPDATE_DATE)
  10. values ("csmupt","CSM UPT Super Admin Application",0,0,sysdate());
  11.  
  12. insert into CSM_USER (USER_ID,LOGIN_NAME,FIRST_NAME,LAST_NAME,PASSWORD,UPDATE_DATE)
  13. values (1,"admin","UPT","Administrator","zJPWCwDeSgG8j2uyHEABIQ==",sysdate());
  14.  
  15. insert into CSM_PROTECTION_ELEMENT(PROTECTION_ELEMENT_NAME,PROTECTION_ELEMENT_DESCRIPTION,OBJECT_ID,APPLICATION_ID,UPDATE_DATE)
  16. values("csmupt","CSM UPT Super Admin Application Protection Element","csmupt",1,sysdate());
  17.  
  18. insert into CSM_USER_PE(PROTECTION_ELEMENT_ID,USER_ID)
  19. values(1,1);
  20.  
  21. #
  22. # The following entry is for your application.
  23. # Replace <<application_context_name>> with your application name.
  24. #
  25.  
  26. INSERT INTO CSM_APPLICATION(APPLICATION_NAME,APPLICATION_DESCRIPTION,DECLARATIVE_FLAG,ACTIVE_FLAG,CSM_VERSION,UPDATE_DATE)
  27. VALUES ("caintegrator2","caIntegrator2 Data Portal",0,0,"4.2",sysdate());
  28.  
  29. insert into CSM_USER (USER_ID,LOGIN_NAME,FIRST_NAME,LAST_NAME,PASSWORD,UPDATE_DATE)
  30. values (2,"cai2admin","cai2","Admin","zJPWCwDeSgG8j2uyHEABIQ==",sysdate());
  31.  
  32. insert into CSM_PROTECTION_ELEMENT(PROTECTION_ELEMENT_NAME,PROTECTION_ELEMENT_DESCRIPTION,OBJECT_ID,APPLICATION_ID,UPDATE_DATE)
  33. values("caintegrator2","caintegrator2 Data Portal","caintegrator2",1,sysdate());
  34.  
  35. insert into CSM_USER_PE(PROTECTION_ELEMENT_ID,USER_ID)
  36. values(2,2);
  37.  
  38. #
  39. # The following entries are Common Set of Privileges
  40. #
  41.  
  42. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  43. VALUES("CREATE","This privilege grants permission to a user to create an entity. This entity can be an object, a database entry, or a resource such as a network connection", sysdate());
  44.  
  45. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  46. VALUES("ACCESS","This privilege allows a user to access a particular resource.  Examples of resources include a network or database connection, socket, module of the application, or even the application itself", sysdate());
  47.  
  48. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  49. VALUES("READ","This privilege permits the user to read data from a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to read data about a particular entry", sysdate());
  50.  
  51. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  52. VALUES("WRITE","This privilege allows a user to write data to a file, URL, database, an object, etc. This can be used at an entity level signifying that the user is allowed to write data about a particular entity", sysdate());
  53.  
  54. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  55. VALUES("UPDATE","This privilege grants permission at an entity level and signifies that the user is allowed to update data for a particular entity. Entities may include an object, object attribute, database row etc", sysdate());
  56.  
  57. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  58. VALUES("DELETE","This privilege permits a user to delete a logical entity. This entity can be an object, a database entry, a resource such as a network connection, etc", sysdate());
  59.  
  60. INSERT INTO CSM_PRIVILEGE (privilege_name, privilege_description, update_date)
  61. VALUES("EXECUTE","This privilege allows a user to execute a particular resource. The resource can be a method, function, behavior of the application, URL, button etc", sysdate());
  62.  
  63. #
  64. # The following entries are for inserting a generic StudyManager and ResearchInvestigator into
  65. # the tables for development purposes
  66. #
  67.  
  68. INSERT INTO CSM_USER (USER_ID,LOGIN_NAME,FIRST_NAME,LAST_NAME,ORGANIZATION,DEPARTMENT,TITLE,PHONE_NUMBER,PASSWORD,EMAIL_ID,START_DATE,END_DATE,UPDATE_DATE)
  69. VALUES (3,'ncimanager','Study','Manager','','','','','zJPWCwDeSgG8j2uyHEABIQ==','',null,null,sysdate());
  70. INSERT INTO CSM_USER (USER_ID,LOGIN_NAME,FIRST_NAME,LAST_NAME,ORGANIZATION,DEPARTMENT,TITLE,PHONE_NUMBER,PASSWORD,EMAIL_ID,START_DATE,END_DATE,UPDATE_DATE)
  71. VALUES (4,'nciinvestigator','Research','Investigator','','','','','zJPWCwDeSgG8j2uyHEABIQ==','',null,null,sysdate());
  72.  
  73. INSERT INTO CSM_PROTECTION_GROUP (PROTECTION_GROUP_ID,PROTECTION_GROUP_NAME,PROTECTION_GROUP_DESCRIPTION,APPLICATION_ID,LARGE_ELEMENT_COUNT_FLAG,UPDATE_DATE,PARENT_PROTECTION_GROUP_ID)
  74. VALUES (1,'Platforms','Secures the Platform object',2,0,sysdate(),null);
  75. INSERT INTO CSM_PROTECTION_GROUP (PROTECTION_GROUP_ID,PROTECTION_GROUP_NAME,PROTECTION_GROUP_DESCRIPTION,APPLICATION_ID,LARGE_ELEMENT_COUNT_FLAG,UPDATE_DATE,PARENT_PROTECTION_GROUP_ID)
  76. VALUES (2,'NCI Protected Studies','Studies that are protected for the NCI Groups.',2,0,sysdate(),null);
  77.  
  78.  
  79. INSERT INTO CSM_ROLE (ROLE_ID,ROLE_NAME,ROLE_DESCRIPTION,APPLICATION_ID,ACTIVE_FLAG,UPDATE_DATE)
  80. VALUES (1,'STUDY_MANAGER_ROLE','This is the role of the study manager.',2,1,sysdate());
  81. INSERT INTO CSM_ROLE (ROLE_ID,ROLE_NAME,ROLE_DESCRIPTION,APPLICATION_ID,ACTIVE_FLAG,UPDATE_DATE)
  82. VALUES (2,'STUDY_INVESTIGATOR_ROLE','The role for Study Investigators',2,1,sysdate());
  83. INSERT INTO CSM_ROLE (ROLE_ID,ROLE_NAME,ROLE_DESCRIPTION,APPLICATION_ID,ACTIVE_FLAG,UPDATE_DATE)
  84. VALUES (3,'PLATFORM_MANAGER_ROLE','The role for the platform manager',2,1,sysdate());
  85.  
  86. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  87. VALUES (1,1,6);
  88. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  89. VALUES (2,1,5);
  90. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  91. VALUES (3,1,4);
  92. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  93. VALUES (4,1,2);
  94. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  95. VALUES (5,1,1);
  96. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  97. VALUES (6,1,7);
  98. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  99. VALUES (7,1,3);
  100. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  101. VALUES (8,2,2);
  102. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  103. VALUES (9,2,3);
  104. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  105. VALUES (10,2,7);
  106. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  107. VALUES (11,3,1);
  108. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  109. VALUES (12,3,2);
  110. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  111. VALUES (13,3,3);
  112. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  113. VALUES (14,3,4);
  114. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  115. VALUES (15,3,5);
  116. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  117. VALUES (16,3,6);
  118. INSERT INTO CSM_ROLE_PRIVILEGE (ROLE_PRIVILEGE_ID,ROLE_ID,PRIVILEGE_ID)
  119. VALUES (17,3,7);
  120.  
  121. INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID)
  122. VALUES (1,'Platform Manager Group','The platform manager group.',sysdate(),2);
  123. INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID)
  124. VALUES (2,'NCI Study Managers','Study Managers who can create/modify any NCI studies.',sysdate(),2);
  125. INSERT INTO CSM_GROUP (GROUP_ID,GROUP_NAME,GROUP_DESC,UPDATE_DATE,APPLICATION_ID)
  126. VALUES (3,'NCI Study Investigators','Study investigators for the NCI studies.',sysdate(),2);
  127.  
  128. INSERT INTO CSM_USER_GROUP (USER_GROUP_ID,USER_ID,GROUP_ID)
  129. VALUES (1,3,1);
  130. INSERT INTO CSM_USER_GROUP (USER_GROUP_ID,USER_ID,GROUP_ID)
  131. VALUES (2,3,2);
  132. INSERT INTO CSM_USER_GROUP (USER_GROUP_ID,USER_ID,GROUP_ID)  
  133. VALUES (3,4,3);
  134.  
  135. INSERT INTO CSM_USER_GROUP_ROLE_PG (USER_GROUP_ROLE_PG_ID,USER_ID,GROUP_ID,ROLE_ID,PROTECTION_GROUP_ID,UPDATE_DATE)
  136. VALUES (1,null,1,3,1,sysdate());
  137. INSERT INTO CSM_USER_GROUP_ROLE_PG (USER_GROUP_ROLE_PG_ID,USER_ID,GROUP_ID,ROLE_ID,PROTECTION_GROUP_ID,UPDATE_DATE)
  138. VALUES (2,null,2,1,2,sysdate());
  139. INSERT INTO CSM_USER_GROUP_ROLE_PG (USER_GROUP_ROLE_PG_ID,USER_ID,GROUP_ID,ROLE_ID,PROTECTION_GROUP_ID,UPDATE_DATE)
  140. VALUES (3,null,3,2,2,sysdate());
  141.  
  142. INSERT INTO CSM_FILTER_CLAUSE (
  143.     FILTER_CLAUSE_ID,
  144.     CLASS_NAME,
  145.     FILTER_CHAIN,
  146.     TARGET_CLASS_NAME,
  147.     TARGET_CLASS_ATTRIBUTE_NAME,
  148.     TARGET_CLASS_ATTRIBUTE_TYPE,
  149.     TARGET_CLASS_ALIAS,
  150.     TARGET_CLASS_ATTRIBUTE_ALIAS,
  151.     GENERATED_SQL_USER,
  152.     GENERATED_SQL_GROUP,
  153.     APPLICATION_ID,UPDATE_DATE)
  154. VALUES (
  155.     1,
  156.     'gov.nih.nci.caintegrator2.domain.translational.Study',
  157.     'gov.nih.nci.caintegrator2.domain.translational.Study',
  158.     'gov.nih.nci.caintegrator2.domain.translational.Study - self',
  159.     'id',
  160.     'java.lang.Long',
  161.     '',
  162.     '',
  163.     'ID in (select table_name_csm_.ID
  164.               from STUDY table_name_csm_
  165.              where table_name_csm_.ID in
  166.                    (select pe.attribute_value
  167.                       from csm_protection_group pg,
  168.                            csm_protection_element pe,
  169.                            csm_pg_pe pgpe,
  170.                            csm_user_group_role_pg ugrpg,
  171.                            csm_user u,
  172.                            csm_role_privilege rp,
  173.                            csm_role r,
  174.                            csm_privilege p
  175.                      where ugrpg.role_id = r.role_id
  176.                        and ugrpg.user_id = u.user_id
  177.                        and ugrpg.protection_group_id = ANY
  178.                            (select pg1.protection_group_id
  179.                               from csm_protection_group pg1
  180.                              where pg1.protection_group_id = pg.protection_group_id
  181.                                 or pg1.protection_group_id =
  182.                                    (select pg2.parent_protection_group_id
  183.                                       from csm_protection_group pg2
  184.                                      where pg2.protection_group_id = pg.protection_group_id))
  185.                                        and pg.protection_group_id = pgpe.protection_group_id
  186.                                        and pgpe.protection_element_id = pe.protection_element_id
  187.                                        and r.role_id = rp.role_id
  188.                                        and rp.privilege_id = p.privilege_id
  189.                                        and pe.object_id= ''gov.nih.nci.caintegrator2.domain.translational.Study''
  190.                                        and pe.attribute=''id''
  191.                                        and p.privilege_name=''READ''
  192.                                        and u.login_name=:USER_NAME
  193.                                        and pe.application_id=:APPLICATION_ID))',
  194.     'ID in (select table_name_csm_.ID
  195.               from STUDY table_name_csm_
  196.              where table_name_csm_.ID in
  197.                    (SELECT Distinct pe.attribute_value
  198.                       FROM CSM_PROTECTION_GROUP pg,
  199.                            CSM_PROTECTION_ELEMENT pe,
  200.                            CSM_PG_PE pgpe,
  201.                            CSM_USER_GROUP_ROLE_PG ugrpg,
  202.                            CSM_GROUP g,
  203.                            CSM_ROLE_PRIVILEGE rp,
  204.                            CSM_ROLE r,
  205.                            CSM_PRIVILEGE p
  206.                      WHERE ugrpg.role_id = r.role_id
  207.                        AND ugrpg.group_id = g.group_id
  208.                        AND ugrpg.protection_group_id = ANY
  209.                           (select pg1.protection_group_id
  210.                              from csm_protection_group pg1
  211.                             where pg1.protection_group_id = pg.protection_group_id
  212.                                OR pg1.protection_group_id =
  213.                                   (select pg2.parent_protection_group_id
  214.                                      from csm_protection_group pg2
  215.                                     where pg2.protection_group_id = pg.protection_group_id) )
  216.                                       AND pg.protection_group_id = pgpe.protection_group_id
  217.                                       AND pgpe.protection_element_id = pe.protection_element_id
  218.                                       AND r.role_id = rp.role_id
  219.                                       AND rp.privilege_id = p.privilege_id
  220.                                       AND pe.object_id= ''gov.nih.nci.caintegrator2.domain.translational.Study''
  221.                                       AND p.privilege_name=''READ''
  222.                                       AND g.group_name IN
  223.                                           (:GROUP_NAMES )
  224.                                       AND pe.application_id=:APPLICATION_ID))',2,sysdate());
  225. INSERT INTO CSM_FILTER_CLAUSE (
  226.     FILTER_CLAUSE_ID,
  227.     CLASS_NAME,
  228.     FILTER_CHAIN,
  229.     TARGET_CLASS_NAME,
  230.     TARGET_CLASS_ATTRIBUTE_NAME,
  231.     TARGET_CLASS_ATTRIBUTE_TYPE,
  232.     TARGET_CLASS_ALIAS,
  233.     TARGET_CLASS_ATTRIBUTE_ALIAS,
  234.     GENERATED_SQL_USER,
  235.     GENERATED_SQL_GROUP,
  236.     APPLICATION_ID,UPDATE_DATE)
  237. VALUES (
  238.     2,
  239.     'gov.nih.nci.caintegrator2.domain.application.StudySubscription',
  240.     'study',
  241.     'gov.nih.nci.caintegrator2.domain.translational.Study - study',
  242.     'id',
  243.     'java.lang.Long',
  244.     '',
  245.     '',
  246.     'ID in (select table_name_csm_.ID
  247.               from STUDY_SUBSCRIPTION table_name_csm_ inner join STUDY study1_ on table_name_csm_.STUDY_ID=study1_.ID
  248.              where study1_.ID in
  249.                   (select pe.attribute_value
  250.                      from csm_protection_group pg,
  251.                           csm_protection_element pe,
  252.                           csm_pg_pe pgpe,
  253.                           csm_user_group_role_pg ugrpg,
  254.                           csm_user u,
  255.                           csm_role_privilege rp,
  256.                           csm_role r,
  257.                           csm_privilege p
  258.                     where ugrpg.role_id = r.role_id
  259.                       and ugrpg.user_id = u.user_id
  260.                       and ugrpg.protection_group_id = ANY
  261.                           (select pg1.protection_group_id
  262.                              from csm_protection_group pg1
  263.                             where pg1.protection_group_id = pg.protection_group_id
  264.                                or pg1.protection_group_id =
  265.                                   (select pg2.parent_protection_group_id
  266.                                      from csm_protection_group pg2
  267.                                     where pg2.protection_group_id = pg.protection_group_id))
  268.                                       and pg.protection_group_id = pgpe.protection_group_id
  269.                                       and pgpe.protection_element_id = pe.protection_element_id
  270.                                       and r.role_id = rp.role_id
  271.                                       and rp.privilege_id = p.privilege_id
  272.                                       and pe.object_id = ''gov.nih.nci.caintegrator2.domain.translational.Study''
  273.                                       and pe.attribute=''id''
  274.                                       and p.privilege_name=''READ''
  275.                                       and u.login_name=:USER_NAME
  276.                                       and pe.application_id=:APPLICATION_ID))',
  277.     'ID in (select table_name_csm_.ID
  278.               from STUDY_SUBSCRIPTION table_name_csm_ inner join STUDY study1_ on table_name_csm_.STUDY_ID=study1_.ID
  279.              where study1_.ID in
  280.                    (SELECT Distinct pe.attribute_value
  281.                       FROM CSM_PROTECTION_GROUP pg,
  282.                            CSM_PROTECTION_ELEMENT pe,
  283.                            CSM_PG_PE pgpe,
  284.                            CSM_USER_GROUP_ROLE_PG ugrpg,
  285.                            CSM_GROUP g,
  286.                            CSM_ROLE_PRIVILEGE rp,
  287.                            CSM_ROLE r,
  288.                            CSM_PRIVILEGE p
  289.                      WHERE ugrpg.role_id = r.role_id
  290.                        AND ugrpg.group_id = g.group_id
  291.                        AND ugrpg.protection_group_id = ANY
  292.                            (select pg1.protection_group_id
  293.                               from csm_protection_group pg1
  294.                              where pg1.protection_group_id = pg.protection_group_id
  295.                                 OR pg1.protection_group_id =
  296.                                    (select pg2.parent_protection_group_id
  297.                                       from csm_protection_group pg2
  298.                                      where pg2.protection_group_id = pg.protection_group_id) )
  299.                                AND pg.protection_group_id = pgpe.protection_group_id
  300.                                AND pgpe.protection_element_id = pe.protection_element_id
  301.                                AND r.role_id = rp.role_id
  302.                                AND rp.privilege_id = p.privilege_id
  303.                                AND pe.object_id= ''gov.nih.nci.caintegrator2.domain.translational.Study''
  304.                                AND p.privilege_name=''READ''
  305.                                AND g.group_name IN (:GROUP_NAMES )
  306.                                AND pe.application_id=:APPLICATION_ID))',2,sysdate());
  307.  
  308. INSERT INTO CSM_FILTER_CLAUSE (
  309.     FILTER_CLAUSE_ID,
  310.     CLASS_NAME,
  311.     FILTER_CHAIN,
  312.     TARGET_CLASS_NAME,
  313.     TARGET_CLASS_ATTRIBUTE_NAME,
  314.     TARGET_CLASS_ATTRIBUTE_TYPE,
  315.     TARGET_CLASS_ALIAS,
  316.     TARGET_CLASS_ATTRIBUTE_ALIAS,
  317.     GENERATED_SQL_USER,
  318.     GENERATED_SQL_GROUP,
  319.     APPLICATION_ID,
  320.     UPDATE_DATE)
  321. VALUES (
  322.     3,
  323.     'gov.nih.nci.caintegrator2.application.study.StudyConfiguration',
  324.     'study',
  325.     'gov.nih.nci.caintegrator2.domain.translational.Study - study',
  326.     'id',
  327.     'java.lang.Long',
  328.     '',
  329.     '',
  330.     'ID in (select table_name_csm_.ID
  331.               from STUDY_CONFIGURATION table_name_csm_ inner join STUDY study1_ on table_name_csm_.STUDY_ID=study1_.ID
  332.              where study1_.ID in
  333.                   (select pe.attribute_value
  334.                      from csm_protection_group pg,
  335.                           csm_protection_element pe,
  336.                           csm_pg_pe pgpe,
  337.                           csm_user_group_role_pg ugrpg,
  338.                           csm_user u,
  339.                           csm_role_privilege rp,
  340.                           csm_role r,
  341.                           csm_privilege p
  342.                     where ugrpg.role_id = r.role_id
  343.                       and ugrpg.user_id = u.user_id
  344.                       and ugrpg.protection_group_id = ANY
  345.                           (select pg1.protection_group_id
  346.                              from csm_protection_group pg1
  347.                             where pg1.protection_group_id = pg.protection_group_id
  348.                                or pg1.protection_group_id =
  349.                                   (select pg2.parent_protection_group_id
  350.                                      from csm_protection_group pg2
  351.                                     where pg2.protection_group_id = pg.protection_group_id))
  352.                       and pg.protection_group_id = pgpe.protection_group_id
  353.                       and pgpe.protection_element_id = pe.protection_element_id
  354.                       and r.role_id = rp.role_id
  355.                       and rp.privilege_id = p.privilege_id
  356.                       and pe.object_id= ''gov.nih.nci.caintegrator2.domain.translational.Study''
  357.                       and pe.attribute=''id''
  358.                       and p.privilege_name=''READ''
  359.                       and u.login_name=:USER_NAME
  360.                       and pe.application_id=:APPLICATION_ID))',
  361.     'ID in (select table_name_csm_.ID
  362.               from STUDY_CONFIGURATION table_name_csm_ inner join STUDY study1_ on table_name_csm_.STUDY_ID=study1_.ID
  363.              where study1_.ID in
  364.                    (SELECT Distinct pe.attribute_value
  365.                       FROM CSM_PROTECTION_GROUP pg,
  366.                            CSM_PROTECTION_ELEMENT pe,
  367.                            CSM_PG_PE pgpe,
  368.                            CSM_USER_GROUP_ROLE_PG ugrpg,
  369.                            CSM_GROUP g,
  370.                            CSM_ROLE_PRIVILEGE rp,
  371.                            CSM_ROLE r,
  372.                            CSM_PRIVILEGE p
  373.                      WHERE ugrpg.role_id = r.role_id
  374.                        AND ugrpg.group_id = g.group_id
  375.                        AND ugrpg.protection_group_id = ANY
  376.                            (select pg1.protection_group_id
  377.                               from csm_protection_group pg1
  378.                              where pg1.protection_group_id = pg.protection_group_id
  379.                                 OR pg1.protection_group_id =
  380.                                    (select pg2.parent_protection_group_id
  381.                                       from csm_protection_group pg2
  382.                                      where pg2.protection_group_id = pg.protection_group_id) )
  383.                        AND pg.protection_group_id = pgpe.protection_group_id
  384.                        AND pgpe.protection_element_id = pe.protection_element_id
  385.                        AND r.role_id = rp.role_id
  386.                        AND rp.privilege_id = p.privilege_id
  387.                        AND pe.object_id= ''gov.nih.nci.caintegrator2.domain.translational.Study''
  388.                        AND p.privilege_name=''READ''
  389.                        AND g.group_name IN (:GROUP_NAMES )
  390.                        AND pe.application_id=:APPLICATION_ID))',2,sysdate());
  391.  
  392.  
  393. COMMIT;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top