Hi There,

approx 3000+ users will hit to our applications, based on their role assigned to user name & we have to hide or show sub menu items.

Is there any better way to handle this kind of access?

e.g: Menu > Create New Request (drop down)

Sub menu (A, B, C, D, E, F web pages)

access may be different to each individual users i.e. Person 1 can access A,B,C and Person 2 only D, Person 3 only E, F and Person 4 may have all A to F based on the role assigned in SQL Physical table.

So We should show only those sub menu items which they have access, hide sub menu items which they don't have.


I am thinking to pull type of access through SQL Query and IF condition for each sub menu item. Is it a right way am dong?

If Sql query validation is correct to this kind of logic, where I need place this logic(in each web page or any centralized place) ?

Please suggest.


Thanks

Seetharam,

You can put the logic in the Preparation of the Menu web block.  I would create a new Action returning the user's access record from the database, make it a function, and set it to cache for a few minutes. That way you're not hitting the database every time the menu loads.

Seetharam,

In order to continue to reap the benefits of OutSystems scaffolding, you should continue to keep your Menu and SubMenu items in the provided static entities if you can. In the past, I have simply done role checks for the current user and used "If" widgets in the Menu Block to dynamically hide menu items based on the users Role. Since it sounds like you are making use of the User provider Roles/Groups features, this might work for you, too. 


Grayson Udstrand wrote:

Seetharam,

In order to continue to reap the benefits of OutSystems scaffolding, you should continue to keep your Menu and SubMenu items in the provided static entities if you can. In the past, I have simply done role checks for the current user and used "If" widgets in the Menu Block to dynamically hide menu items based on the users Role. Since it sounds like you are making use of the User provider Roles/Groups features, this might work for you, too. 


Thank you, Do you have any links/ screenshots?


Kevin Swanson wrote:

Seetharam,

You can put the logic in the Preparation of the Menu web block.  I would create a new Action returning the user's access record from the database, make it a function, and set it to cache for a few minutes. That way you're not hitting the database every time the menu loads.


Thank you, Do you have any links/ screenshots?


Seetharam Phanindra Maringanti wrote:

Kevin Swanson wrote:

Seetharam,

You can put the logic in the Preparation of the Menu web block.  I would create a new Action returning the user's access record from the database, make it a function, and set it to cache for a few minutes. That way you're not hitting the database every time the menu loads.


Thank you, Do you have any links/ screenshots?


Not at this time, but it's fairly basic functionality.  When you create an Action, there are properties for both setting the cache in minutes and specifying whether or not it's a function.