Screen Rendering on Menu Permission

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Screen Rendering on Menu Permission

SAURABH SINGH
Hi All

I want help on screen rendering after applying the menu permission

Problem Statement -
I have one module called budget in which I have 3 menus
1.Inwards
2.Outwords
3.Upload and an user has the permission of only third menu which is
"Upload" so while login with this user the menu will be visible for him is
Upload but the controlled in being called is "main" and on this main the
defined screen is "Inward"

So what i want to do is if the user has the permission of Only this menu
there the screen should render the 3rd menu screen only which is upload
menu.

Please help me if needed i can give more clarification on problem
statement.
--




*Thanks & RegardsSAURABH SINGH**Software Engineer*
Reply | Threaded
Open this post in threaded view
|

Re: Screen Rendering on Menu Permission

Gil Portenseigne
Hi Saurabh,

A solution is to customize your main screen to check the permission, and include the screen you want following your defined rules :

    <screen name="main">
        <section>
            <condition><!-- set your rules here -->
                <and>
                    <if-has-permission permission="BUDGET" action="_UPLOAD"/>
                    <not><if-has-permission permission="BUDGET" action="_OTHER"/></not>
                </and>
            </condition>
            <widgets>
                <decorator-screen name="BudgetCommonDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <include-screen name="Upload" location="component://budget/widget/budget/CommonScreens.xml"/>
                    </decorator-section>
                </decorator-screen>
            </widgets>
            <fail-widgets>
                <decorator-screen name="BudgetCommonDecorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <include-screen name="Inwards" location="component://budget/widget/budget/CommonScreens.xml"/>
                    </decorator-section>
                </decorator-screen>
            </fail-widgets>
        </section>
    </screen>


HTH

Gil

On 17/09/2015 20:40, SAURABH SINGH wrote:
Hi All

I want help on screen rendering after applying the menu permission

Problem Statement -
I have one module called budget in which I have 3 menus
1.Inwards
2.Outwords
3.Upload and an user has the permission of only third menu which is
"Upload" so while login with this user the menu will be visible for him is
Upload but the controlled in being called is "main" and on this main the
defined screen is "Inward"

So what i want to do is if the user has the permission of Only this menu
there the screen should render the 3rd menu screen only which is upload
menu.

Please help me if needed i can give more clarification on problem
statement.