X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ecomp-portal-BE-common%2Fsrc%2Fmain%2Fwebapp%2FWEB-INF%2Ffusion%2Form%2FEP.hbm.xml;h=14156f46abe91dd0e0aec8852a9bb82a3adaee75;hb=c1cda6283174db9ab610ce7142222c8a00be5bc9;hp=34bd66af03730e9304e60dc0db2d3534f9bebadb;hpb=2edaa4d6a5f7066e0c718f85a7bf7b8dabd0c59b;p=portal.git diff --git a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml index 34bd66af..14156f46 100644 --- a/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml +++ b/ecomp-portal-BE-common/src/main/webapp/WEB-INF/fusion/orm/EP.hbm.xml @@ -3,7 +3,7 @@ ============LICENSE_START========================================== ONAP Portal =================================================================== - Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. =================================================================== Unless otherwise specified, all software contained herein is licensed @@ -40,9 +40,32 @@ "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> - + + + + + + + + + + + + + + + + + + + + + + + + @@ -206,6 +229,8 @@ + + @@ -287,8 +312,8 @@ - - + + @@ -303,10 +328,10 @@ - - - - + + + + @@ -315,11 +340,11 @@ - + - + @@ -340,12 +365,22 @@ - + + + + + + + + + + + @@ -528,6 +563,31 @@ + + + + + + + + + + + + + + + + + @@ -1117,7 +1177,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y @@ -1198,7 +1258,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1211,6 +1271,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y or (a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S') ) + and a.app_type != 3 union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , @@ -1218,7 +1279,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION , b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d , ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id order by app_name @@ -1239,7 +1300,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1250,6 +1311,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y or (a.OPEN = 'N' and r.USER_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) ) + and a.app_type != 3 union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , @@ -1257,7 +1319,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d , ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id order by app_name @@ -1281,7 +1343,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1294,6 +1356,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y or (a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S') ) + and a.app_type != 3 union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , @@ -1301,14 +1364,17 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d , ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id ) A left outer join - (select distinct - c.AFFECTED_RECORD_ID, c.AUDIT_DATE - from FN_AUDIT_LOG c + (select FN_AUDIT_LOG.AFFECTED_RECORD_ID, max(FN_AUDIT_LOG.AUDIT_DATE) AS AUDIT_DATE + from FN_APP LEFT JOIN FN_AUDIT_LOG + on FN_APP.APP_ID = FN_AUDIT_LOG.AFFECTED_RECORD_ID + where FN_APP.ENABLED = 'Y' and FN_AUDIT_LOG.user_id=:userId + and (audit_date) BETWEEN (CURDATE() - INTERVAL 90 DAY) and CURDATE() + group by FN_AUDIT_LOG.AFFECTED_RECORD_ID )B on A.app_id = B.Affected_record_id order by AUDIT_DATE DESC; @@ -1326,7 +1392,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1336,22 +1402,27 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y (a.OPEN = 'Y' and p.STATUS_CD = 'S') or (a.OPEN = 'N' and r.USER_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) - )union + ) + and a.app_type != 3 + union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , b.APP_NOTES , b.APP_URL , b.APP_ALTERNATE_URL , b.APP_REST_ENDPOINT , b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d , ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id ) A left outer join - (select distinct - c.AFFECTED_RECORD_ID, c.AUDIT_DATE - from FN_AUDIT_LOG c + (select FN_AUDIT_LOG.AFFECTED_RECORD_ID, max(FN_AUDIT_LOG.AUDIT_DATE) AS AUDIT_DATE + from FN_APP LEFT JOIN FN_AUDIT_LOG + on FN_APP.APP_ID = FN_AUDIT_LOG.AFFECTED_RECORD_ID + where FN_APP.ENABLED = 'Y' and FN_AUDIT_LOG.user_id=:userId + and (audit_date) BETWEEN (CURDATE() - INTERVAL 90 DAY) and CURDATE() + group by FN_AUDIT_LOG.AFFECTED_RECORD_ID )B on A.app_id = B.Affected_record_id order by AUDIT_DATE DESC; @@ -1375,7 +1446,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1387,14 +1458,16 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y (a.OPEN = 'N' and r.ROLE_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) or (a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S') - )union + ) + and a.app_type != 3 + union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , b.APP_NOTES , b.APP_URL , b.APP_ALTERNATE_URL , b.APP_REST_ENDPOINT , b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d , ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id ) A @@ -1425,7 +1498,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1435,14 +1508,16 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y (a.OPEN = 'Y' and p.STATUS_CD = 'S') or (a.OPEN = 'N' and r.USER_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) - )union + ) + and a.app_type != 3 + union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , b.APP_NOTES , b.APP_URL , b.APP_ALTERNATE_URL , b.APP_REST_ENDPOINT , b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d, ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id )A @@ -1472,7 +1547,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1484,14 +1559,16 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y (a.OPEN = 'N' and r.ROLE_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) or (a.OPEN = 'N' and r.ROLE_ID is null and p.STATUS_CD = 'S') - )union + ) + and a.app_type != 3 + union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , b.APP_NOTES , b.APP_URL , b.APP_ALTERNATE_URL , b.APP_REST_ENDPOINT , b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d, ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id ) A @@ -1519,7 +1596,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y a.ML_APP_NAME , a.ML_APP_ADMIN_ID , a.MOTS_ID , a.APP_PASSWORD , a.THUMBNAIL , a.APP_USERNAME , a.OPEN , a.ENABLED , a.UEB_TOPIC_NAME , a.UEB_KEY , a.UEB_SECRET , a.APP_TYPE , a.AUTH_CENTRAL , - a.AUTH_NAMESPACE + a.AUTH_NAMESPACE , a.MODE_OF_INTEGRATION, a.ACK_APP , a.USES_CADI from FN_APP a -- Portal assigns role 999 to app administrator left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 @@ -1529,14 +1606,16 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y (a.OPEN = 'Y' and p.STATUS_CD = 'S') or (a.OPEN = 'N' and r.USER_ID is not null and (p.STATUS_CD is null or p.STATUS_CD != 'H')) - )union + ) + and a.app_type != 3 + union select distinct -- multiple roles yield multiple rows b.APP_ID , b.APP_NAME , b.APP_IMAGE_URL ,b.APP_DESCRIPTION , b.APP_NOTES , b.APP_URL , b.APP_ALTERNATE_URL , b.APP_REST_ENDPOINT , b.ML_APP_NAME , b.ML_APP_ADMIN_ID , b.MOTS_ID , b.APP_PASSWORD , b.THUMBNAIL , b.APP_USERNAME , b.OPEN , b.ENABLED , b.UEB_TOPIC_NAME , b.UEB_KEY , b.UEB_SECRET , b.APP_TYPE , b.AUTH_CENTRAL , - b.AUTH_NAMESPACE + b.AUTH_NAMESPACE , b.MODE_OF_INTEGRATION, b.ACK_APP , b.USES_CADI from fn_user_role a, fn_app b, ep_app_role_function c , fn_role d, ep_app_function e where a.user_id =:userId and b.app_id = c.app_id and a.app_id = c.role_app_id and b.enabled = 'Y' and c.role_id = d.role_id and d.active_yn='Y' and a.role_id = d.role_id and e.app_id = c.app_id ) A @@ -1591,8 +1670,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId left outer join EP_USER_ROLES_REQUEST q ON a.APP_ID = q.APP_ID and q.USER_ID = :userId and q.request_status = 'P' - where a.ENABLED = 'Y' - + where a.ENABLED = 'Y' and a.app_type != 3 -- Show accessible apps first, then the rest; sort by name within each set. order by access desc, app_name asc ; @@ -1841,7 +1919,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y left outer join FN_USER_ROLE r ON a.APP_ID = r.APP_ID and r.USER_ID = :userId and r.ROLE_ID != 999 left outer join FN_PERS_USER_APP_SEL p ON a.APP_ID = p.APP_ID and p.USER_ID = :userId left outer join EP_USER_ROLES_REQUEST q ON a.APP_ID = q.APP_ID and q.USER_ID = :userId and q.request_status = 'P' - where a.ENABLED = 'Y' + where a.ENABLED = 'Y' and a.app_type != 3 -- Show accessible apps first, then the rest; sort by name within each set. order by access desc, app_name asc ; @@ -1941,7 +2019,7 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y class="org.onap.portalapp.portal.transport.EPUserAppCurrentRoles" /> @@ -2072,6 +2150,51 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y ]]> + + + + + + + + + + + + + + + + @@ -2408,5 +2531,89 @@ where fn_role.app_id = fn_app.app_id and fn_app.enabled='Y' and fn_role.active_y order by role_id; ]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +