+ ]]>
+ </sql-query>
+
+ <sql-query name="getAllCentralizedAppsRoles">
+ <return alias="allCentralizedAppsRoles"
+ class="org.onap.portalapp.portal.transport.CentralizedAppRoles" />
+ <![CDATA[
+ select distinct fa.app_id, fa.auth_namespace, fr.role_name, fr.role_id from fn_app fa, fn_role fr where fa.auth_central = 'Y' and fa.auth_namespace is not null
+ and (fa.app_id = fr.app_id or COALESCE(fr.app_id,1) = fa.app_id) and fr.active_yn = 'Y' order by fa.app_id ;
+ ]]>
+ </sql-query>
+
+ <sql-query name="getUserCentralizedAppRoles">
+ <return alias="userCentralizedAppRoles"
+ class="org.onap.portalapp.portal.transport.CentralizedAppRoles" />
+ <![CDATA[
+ select distinct fur.app_id, fa.auth_namespace, fr.role_name, fur.role_id from fn_user_role fur, fn_app fa, fn_role fr, fn_user fu
+ where fa.app_id = fur.app_id
+ and fr.role_id = fur.role_id
+ and fu.user_id = fur.user_id
+ and fu.ORG_USER_ID = :orgUserId
+ and fa.auth_namespace is not null
+ and fr.active_yn = 'Y'
+ order by role_id;
+ ]]>
+ </sql-query>
+