From d28b7f1b75e3fbb77ec24a4986b25ef884fd442f Mon Sep 17 00:00:00 2001 From: Robert Krajcik Date: Mon, 14 Aug 2023 15:13:14 -0400 Subject: [PATCH] update DESCRIPTION, NEWS.md, run_app.R and utils_startup.R for master --- DESCRIPTION | 2 +- NEWS.md | 2 -- R/run_app.R | 38 +++++++++++++++++++------------------- R/utils_startup.R | 2 +- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 95b1b2de5..d6c0458cc 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: riskassessment Title: A web app designed to interface with the `riskmetric` package -Version: 2.0.0.9000 +Version: 2.0.0 Authors@R: c( person("Aaron", "Clark", role = c("aut", "cre"), email = "aaron.clark@biogen.com"), person("Robert", "Krajcik", role = "aut", email = "robert.krajcik@biogen.com"), diff --git a/NEWS.md b/NEWS.md index e5175ce1c..bc48f20f3 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,3 @@ -# riskassessment (development version) - # riskassessment 2.0.0 ### Enhancements diff --git a/R/run_app.R b/R/run_app.R index 6f201d1d7..a71a97b6a 100644 --- a/R/run_app.R +++ b/R/run_app.R @@ -44,23 +44,23 @@ run_app <- function( } # Note that this overrides other credential set up - login_creds <- NULL - pre_auth_user <- NULL - if (isFALSE(getOption("golem.app.prod"))) { - arg_lst <- as.list(match.call()) - - login_creds <- list(user_id = "", - user_pwd = "cxk1QEMYSpYcrNB") - if (!is.null(arg_lst$pre_auth_user)) { - pre_auth_user <- arg_lst$pre_auth_user - if (isTRUE(pre_auth_user) || pre_auth_user == "admin") { - login_creds$user_id <- "admin" - } else { - login_creds$user_id <- pre_auth_user - } - credentials_db_name <- gsub("\\.sqlite", "_dev\\.sqlite", credentials_db_name) - } - } + # login_creds <- NULL + # pre_auth_user <- NULL + # if (isFALSE(getOption("golem.app.prod"))) { + # arg_lst <- as.list(match.call()) + # + # login_creds <- list(user_id = "", + # user_pwd = "cxk1QEMYSpYcrNB") + # if (!is.null(arg_lst$pre_auth_user)) { + # pre_auth_user <- arg_lst$pre_auth_user + # if (isTRUE(pre_auth_user) || pre_auth_user == "admin") { + # login_creds$user_id <- "admin" + # } else { + # login_creds$user_id <- pre_auth_user + # } + # credentials_db_name <- gsub("\\.sqlite", "_dev\\.sqlite", credentials_db_name) + # } + # } # Run the app with_golem_options( @@ -75,8 +75,8 @@ run_app <- function( golem_opts = list(app_version = app_ver, credentials_db_name = credentials_db_name, assessment_db_name = assessment_db_name, - pre_auth_user = pre_auth_user, - login_creds = login_creds, + # pre_auth_user = pre_auth_user, + # login_creds = login_creds, decision_categories = decision_categories, ...) ) diff --git a/R/utils_startup.R b/R/utils_startup.R index d2fdc2d66..7d6913e47 100644 --- a/R/utils_startup.R +++ b/R/utils_startup.R @@ -213,7 +213,7 @@ initialize_raa <- function(assess_db, cred_db, decision_cat) { check_credentials(db_config[["credentials"]]) - if (isFALSE(getOption("golem.app.prod")) && !is.null(golem::get_golem_options('pre_auth_user')) && !file.exists(credentials_db)) create_credentials_dev_db(credentials_db) + # if (isFALSE(getOption("golem.app.prod")) && !is.null(golem::get_golem_options('pre_auth_user')) && !file.exists(credentials_db)) create_credentials_dev_db(credentials_db) # Create package db & credentials db if it doesn't exist yet. if(!file.exists(assessment_db)) create_db(assessment_db)