Button Appearing Only When User Has Privileges

Hello,
This is what I am trying to do in Wappler:
On a front-end page showing database fields, how can I add code that when a user with database modifying privileges is logged in, additional buttons appear on the page and allows adding data, e.g.“ADD CLIENT” or modifying database fields, e.g. “MODIFY CLIENT INFO”?

Thanks.

Add a Server Connection at the start of then page to retrieve the current logged in users details by reference to the security provider identity value using a simply query.

image

then use this as a condition for a dynamic attribute “Show” of the button

1 Like

Thank you

I would recommend using conditional region for elements that should be hidden based on login. They are not even visible in the DOM.
With show/hide attributes, the elements are hidden just with display:none CSS… and are visible in the DOM.

Thank you for the feedback. I am still learning Wappler on my free time. I’ll try to figure out the conditional region feature / where to find it.