Using security credentials for element display

I have a menu included in my page as an SSI include. I want to hide menu items from regular logged in users but visible to users with ‘admin’ privileges as defined by my security provider.

What would I add to the dmx-show=" " to accomplish this? (I don’t see any security provider options in the data-picker).

Each of the pages this will appear is protected using the Security Provider Enforcer.

You could define the show/hide region using the groups you have used in your Security Provider.

Yes, but I don’t know what the enter in the criteria part of the command. I’m guessing it’s a session variable, but I don’t know what it is named.

The include file doesn’t have defined connect objects of its own, just what it borrows from the calling page.

This should help you Lee:

I’ve done that previously. I didn’t want to create a user information action on my page, since I can limit access to my page based on the defined role, I wanted to make the menu item visible by referencing that role value from the existing session information (if possible).

(I don’t want to have to recreate the userinfo action on every page that uses the menu ssi include)

@lwoolsey you can put the userdetails server action in the menu SSI :slight_smile: this way it will be available on every page.
Do you want to hide a specific item or the whole nav?

1 Like

Just one item on the nav (a link to the Admin folder/page)

Thanks @Teodor, that worked great.

I seem remember having problems with actions being in include files (likely just a flare-up of PTSD from the bad-old Dreamweaver days…) No such trouble with that in Wappler.

Thanks @Dave for tip too. I was aware of that, just didn’t think it applicable in this case, my bad!

2 Likes

Happy to hear you got everything working Lee :slight_smile:

1 Like