Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding option to suppress user data (#26) #27

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: audit.connect
Title: Posit Connect Health Check
Version: 0.6.3
Version: 0.7.0
Authors@R:
person("Jumping", "Rivers", , "[email protected]", role = c("aut", "cre"))
Description: Posit Connect Health Check. Deploys various content types to
Expand Down
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# audit.connect 0.7.0 _2023-10-03_
- feat: Add option to suppress collection of Connect users' data

# audit.connect 0.6.4 _2023-10-01_
- feat: Check for Posit name leakage

Expand Down
9 changes: 6 additions & 3 deletions R/check.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#' @param token Connect api token. If NULL, use the ENV variable CONNECT_API_KEY
#' @param dir directory location of the the config file
#' @param debug_level Integer, 0 to 2.
#' @param suppress_users Whether to suppress output of Connect users' data.
#' @details
#' Debug level description
#' * 0: clean-up all files; suppress all noise
Expand All @@ -17,7 +18,8 @@
#' @export
check = function(server = NULL, token = NULL,
dir = ".",
debug_level = 0:2) {
debug_level = 0:2,
suppress_users = FALSE) {

debug_level = get_debug_level(force(debug_level))
check_list = list()
Expand All @@ -31,9 +33,10 @@ check = function(server = NULL, token = NULL,

check_list$feature_usage = summarise_feature_usage(get_server(), get_token())
check_list$audit_details = audit_details(get_server(), get_token())
check_list$users_details = summarise_users(get_server(), get_token(), debug_level = debug_level)
if(!suppress_users){
check_list$users_details = summarise_users(get_server(), get_token(), debug_level = debug_level)
}
register_uat_user(get_server(), get_token(), account = get_account())

check_list$results = check_deployments(dir, debug_level)
cli::cli_h1("All checks complete")
invisible(check_list)
Expand Down
10 changes: 9 additions & 1 deletion man/check.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.