How to keep user from manipulating URL? – Questions


I have a repeating group that shows a list of user profiles within a reusable element. When a specific record is selected, that RE profile shows the record via slug parameter. I want to keep my users from editing the URL to show another record – basically I want to redirect back to the current record or show an error message if they try to manipulate the URL.

This isn’t necessarily a privacy matter, but a user experience matter. I tried setting the state of the page to the selected profile on page load, but I think the state is getting cleared when the slug parameter loads, so I can’t show the error message by comparing the current page state to the current slug parameter. Any ideas?

I’ll use “client” as the example data type here with a field in client called “user” for who the “client” belongs to.

“Do only when” workflow. Do only when do search for “clients” constrained by user “ current user & ID = get data from url ?client:count is 0.

Run workflow to either send back to client list or search.

They can still manipulate to view their own clients but if the ID isn’t there’s then it’ll redirect. (This is to be stacked with privacy rules)



Source link

Leave a Comment