Hi all!
I’m building an app that would allow different groups of people to log in. I want to show different content to each user group within a single app. Imagine I have a single dropdown. Group 1 will see only options A and B and group 2 will see options C and D.
This is possible using the environment variable SHINYPROXY_USERGROUPS.
I can simply make a dropdown that contains different things depending on the group this user belongs to:
output$dropdown <- renderUI({
selectInput(
inputId = "variableSelector",
label = "Select variable to plot",
choices = switch(
Sys.getenv("SHINYPROXY_USERGROUPS"),
GROUP1 = c("Option A", "Option B"),
GROUP2 = c("Option C", "Option D")
)
)
})
However I wonder how secure is this? If this was an app deployed on regular Shiny Server I could simply enter JavaScript console and do something like
Shiny.setInputValue('variableSelector', 'Option D')
And this will work even if I’m logged as user from Group 1. However this seems to be harder when using ShinyProxy. Is such solution sufficient in the ShinyProxy context?