Skip to content

Commit

Permalink
chore: include environment variable to filter apps for security
Browse files Browse the repository at this point in the history
  • Loading branch information
DeepanshKhurana committed Sep 14, 2024
1 parent 7f47c84 commit b2eb349
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions app/main.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# nolint start: box_func_import_count_linter
box::use(
dplyr[select],
dplyr[
filter,
select
],
magrittr[`%>%`],
shiny[
div,
Expand All @@ -20,6 +23,9 @@ box::use(
uiOutput
],
shinycssloaders[withSpinner],
stringr[
str_split_1
],
)
# nolint end

Expand Down Expand Up @@ -75,7 +81,15 @@ server <- function(id) {
state$selected_job <- reactive({})

app_list <- reactive({
get_app_list()
# This filter exists solely for Shiny Contest and to preserve privacy for
# the list of apps which is, otherwise, quite long.
get_app_list() |>
filter(
guid %in% str_split_1(
Sys.getenv("APP_LIST"),
","
)
)
})

mod_app_table$server(
Expand Down

0 comments on commit b2eb349

Please sign in to comment.