Skip to content

Commit

Permalink
Merge pull request #151 from Appsilon/feature/#124-shinyProxyUserRetr…
Browse files Browse the repository at this point in the history
…ieval

shinyproxy user retrival
  • Loading branch information
arunkodati77 authored Mar 12, 2024
2 parents 67dc7ed + 00f346b commit e0549f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### New Features

- Updated `get_user` method to retrieve user in `shinyproxy` environment (#124).
- Added flexibility to select between [`RPostgreSQL`, `RPostgres`] drivers (#147).

# shiny.telemetry 0.2.0
Expand Down
9 changes: 7 additions & 2 deletions R/telemetry.R
Original file line number Diff line number Diff line change
Expand Up @@ -721,8 +721,13 @@ Telemetry <- R6::R6Class( # nolint object_name_linter
force_username = NULL
) {
if (!is.null(force_username)) return(force_username)
if (is.null(session) || is.null(session$user)) return(NULL)
session$user
if (isFALSE(is.null(session)) && isFALSE(is.null(session$user))) {
return(session$user) # POSIT Connect
} else if (nzchar(Sys.getenv("SHINYPROXY_USERNAME"))) {
return(Sys.getenv("SHINYPROXY_USERNAME"))
} else {
return(NULL)
}
}
)
)

0 comments on commit e0549f1

Please sign in to comment.