Closed nickmelis closed 6 months ago
Hi, thanks for the PR! The code looks fine on first sight, but I have some doubts with the exact feature. If this option is enabled, the user is redirected to the first app, but that means they can never see the list of other apps. I guess your way of solving this is by having a navbar containing the list of apps (#449 ).
With the discussing in #269 I assumed that you would redirect only when the user has access to a single app. Maybe it would make sense to implement both these behaviors:
proxy:
landing-page: FirstApp
The above configuration would redirect the user to the first app, no matter how many apps they can access.
proxy:
landing-page: SingleApp
The above configuration would redirect the user only if they have access to a single app.
What do you think?
The above configuration would redirect the user only if they have access to a single app.
So, technically speaking (just checking if I understood correctly):
if (apps.length == 1 && landingPage.equals("SingleApp")
-> then only in this case redirect to the only available app
whereas
if (apps.length > 0 && landingPage.equals("FirstApp")
-> then redirect to the first available app
@LEDfan if that's what you had in mind, I'm happy to tweak my PR (shouldn't take long). Thanks
Exactly, would be great, thanks!
I can see how both of these can be very useful, SingleApp
in case of an installation with literally just one app. In which case, no need for an index page or even a navbar. Will get straight to work 😃
@LEDfan just pushed some changes to reflect what we just discussed. Let me know what you think
@LEDfan any movement on this? This would be a great addition.
hi @danielloader I'll include this in the next release, but I don't have an ETA yet.
Hi, this is now part of the ShinyProxy 3.1.0 we released today. Thanks again for your contribution!
Allows ShinyProxy to use the first available app for a logged-in user as landing page, bypassing the built-in index page. This can be used when different permissions for different users makes it impractical to identify an app which is accessible by all users in the system and usable as predefined landing page/app.
Please see relevant discussion here
I'm also assuming, if this is approved and merged, some documentation change will be required. Please can anyone point me to the right resources as I'm quite happy to make the changes myself if that's practical. Thanks
Testing notes: Tested with the following
simple
authentication configuration:jack
, ShinyProxy redirects me straight to06_tabsets
(and no other app is available to me)jeff
, ShinyProxy redirects me straight to01_hello
(and no other app is available to me)