Sys.getenv("SHINYPROXY_USERGROUPS")) returns empty string
See original GitHub issueHello,
I was trying to condition some part of my app on certain user groups, however if try to retrieve the user groups of the logged in user I only get an empty object:
Sys.getenv("SHINYPROXY_USERGROUPS"))
If I try to access the user via:
print(Sys.getenv("SHINYPROXY_USERNAME"))
it works perfectly.
To give a reproducible example, my application.yml looks as follows:
proxy:
port: 8081
authentication: simple
admin-groups: admins
container-log-path: home/felix/container-logs
users:
- name: jack
password: password
groups: admins
- name: jeff
password: password
groups: pv_qs
- name: jane
password: password
groups: [management, test]
docker:
internal-networking: true
specs:
- id: 01_hello
display-name: Hello Application
description: Application which demonstrates the basics of a Shiny app
container-cmd: ["R", "-e", "shinyproxy::run_01_hello()"]
container-image: openanalytics/shinyproxy-demo
container-network: sp-example-net
- id: 06_tabsets
container-cmd: ["R", "-e", "shinyproxy::run_06_tabsets()"]
container-image: openanalytics/shinyproxy-demo
container-network: sp-example-net
- id: 02_lifecycle
display-name: Lifecycle
container-cmd: ["R", "-e", "shiny::runApp('/root/lifecycle')"]
container-image: lifecycle
container-network: sp-example-net
logging:
file:
shinyproxy.log
Is this a known bug? Any hints for a solution?
Much appreciated.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Sys.getenv() returns empty in Shiny Apps - Stack Overflow
I am running a shiny app that needs read some environment variables. That variables are defined before the shiny server starts. For example...
Read more >Sys.getenv: Get Environment Variables - Rdrr.io
On most platforms Sys.getenv() will return a named vector giving the values of all the environment variables, sorted in the current locale.
Read more >Why does Sys.getenv("USERNAME") return empty resul...
Solved: Can someone explain why this R script is not allowed to return environment information in Power BI?
Read more >Get Environment Variables
Sys.getenv(x = NULL, unset = "", names = NA) ... returns a vector of character strings giving the values of the environment variables...
Read more >whoami - README
... or set to an empty string, then it tries running id on Unix-like systems ... in Sys.getenv("USERPROFILE") if it doesn't find it...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks.
I find it confusing that I have to specify groups for a user as follows:
groups = engineers, scientists
while I specify access-groups for an app as:access-groups = [engineer, scientists]
Maybe this way to specify groups for a user is incorrect, but [engineers, scientists] does not work.For clarity: I use shinyproxy 2.3.3
@panoptikum, thanks so much for raising this issue and posting the correct way to specify this stuff - extremely helpful!