Issue with picker when adding routes in security restrict

Before i file a bug report (in case its my system) can someone please check for me, seems too fundamental to be a bug?

When applying a security restrict to an API action an selecting a route with a parameter, the parameter shows in the dialogue but the picker does nothing when clicked.

Guess that means it a bug :grinning:

1 Like

These definitely are linked, though the issue seems deeper than just the picker not displaying.

For me the picker shows, but is empty. I’d expect to be able to add via code view:

$_GET.id

this formats as {{$_GET.id}}, so:

image

but then shows as plain text when the redirect actually occurs.

To clarify re. using routing vs a query parameter the end result I want is to tell the login page where to redirect back to after login. This is defined by a parameter from the url. So I want to redirect on login to:

http://localhost:3000/settings/update_community/0d3be908-18f3-458c-b6da-1b09a7382d7a

Using routing for the redirect url would give a url of:

http://localhost:3000/login//settings/update_community/0d3be908-18f3-458c-b6da-1b09a7382d7a

which doesn’t work. Using a query parameter gives:

http://localhost:3000/login/?redirect_url=/settings/update_community/0d3be908-18f3-458c-b6da-1b09a7382d7a

Which does work.

In either case I need to add the ID dynamically, I tried both via routing and query param but the issue is the same either way. I feel you should be able to add dynamic data into the Login URL (or Forbidden URL) within security restrict. Regardless of the picker not showing I’m not sure the functionality is currently there (or I’m using incorrect syntax)?

In Wappler 4.6.1 it’s now possible to use dynamic data in routes in security restrict.

This topic was automatically closed after 5 days. New replies are no longer allowed.