question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sys.getenv("SHINYPROXY_USERGROUPS")) returns empty string

See original GitHub issue

Hello,

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:open
  • Created 3 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
panoptikumcommented, Jul 23, 2020

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

0reactions
jeffreyhansoncommented, Oct 25, 2021

@panoptikum, thanks so much for raising this issue and posting the correct way to specify this stuff - extremely helpful!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found