Hello Mahi,

You can find multiple examples in the code base looking for : `<fail-widgets>`

One of :

<section>
    <condition>
        <if-service-permission service-name="workEffortGenericPermission" main-action="VIEW"/>
    </condition>
    <widgets>
        <platform-specific><html><html-template location="component://workeffort/template/task/MyTasks.ftl"/></html></platform-specific>
    </widgets>
    <fail-widgets>
        <label style="h3">${uiLabelMap.WorkEffortViewPermissionError}</label>
    </fail-widgets>
</section>

If condition is true, widgets will display, else that will be fail-widgets

Regards

Gil

Le 11/04/2023 à 09:08, Mahi maheshwari a écrit :
Hello Community,

I want to add .ftl files in screens.xml for multiple users based on a few
conditions if there are multiple users named production user and quality
user and other users, so for this users if I want to give permission for
viewing any .ftl files, how can I do it.

*for instance*, if production_user has permission to view only the
production module then render production.ftl ,  if quality_user has
permission to view only the quality module then render quality.ftl and if
assets_user has permission to view the assets module then render
assetmaint.ftl.
I want to give conditions like if else in one <screen> tag in screens.xml

*example: *
in widgets/screens.xml
<screen name="screenName">
if(User has Production_View permission)
then
<html><html-template
location="component://xerus/webapp/xerus/crud/ProductionView.ftl"/></html>
else if(User has AssetMaintaince_View permission)
then
<html><html-template
location="component://xerus/webapp/xerus/crud/ListOfAssets.ftl"/></html>
else if(User has Quality_View permission)
then
     <html><html-template
location="component://xerus/webapp/xerus/crud/QualityMainPage.ftl"/></html>
else
<html><html-template
location="component://xerus/webapp/xerus/crud/NoPermission.ftl"/></html>
END of if
</screen>

please let me know how can I achieve this.


Best Regards,
Maheshwari.

Reply via email to