Closed jino-mariath closed 2 years ago
Or do we have an option to notify the access issue rather than display a blank screen?
Hi @jino-mariath
There is no "official" way to do this in ShinyProxy. However, you can edit the index.html
templates (see: https://github.com/openanalytics/shinyproxy-config-examples/tree/master/04-custom-html-template) and add the following block of code at line 115:
<div th:if="${apps.length == 0}">
<h1>You don't have access to this application.</h1>
</div>
The code inside the div
element will be shown to users when they don't have access to any app.
Thank you so much. I have updated the code on line No. 115 here -- https://github.com/openanalytics/shinyproxy/blob/master/src/main/resources/templates/index.html.
Quick question - Where do I place the file in a container and should I tell this file located in the application.yml file?
When using the official Docker image, you can place the file at /opt/shinyproxy/templates/index.html
. Next you add the following configuration to your application.yml file:
proxy:
template-path: templates
Make sure to "merge" the example, i.e. don't add proxy
two times, but add the template-path
under the existing proxy
section.
Here is an example Dockerfile:
FROM openanalytics/shinyproxy:2.6.0
COPY application.yml /opt/shinyproxy/application.yml
COPY index.html /opt/shinyproxy/templates/index.html
Good luck!
Excellent... Thank you so much. it worked well. Thank you.
Hello Team,
Can we have a Landing page after authentication on Shiny Proxy?
We have a requirement - If the person does not belong to the AD group that we provided inside the application.yml file then the User should get a Notification/message that - You are not authorized to access this page/contact admin. something like that.
Currently, If the user is not part of the AD group, get a white blank page.
it would be great if we can provide some message with a reason on the landing page to the user would be beneficial.
Thank you for your support.