Skip to content

Commit

Permalink
Add FAQ vignette
Browse files Browse the repository at this point in the history
  • Loading branch information
alice-hannah committed Mar 12, 2024
1 parent 8c100e6 commit cc65c57
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
.RData
.Ruserdata
docs
inst/doc
3 changes: 3 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Imports:
rlang
Suggests:
httptest2,
knitr,
rmarkdown,
testthat (>= 3.0.0),
withr
Config/testthat/edition: 3
VignetteBuilder: knitr
9 changes: 7 additions & 2 deletions R/bypass_2fa.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#' Allow/disallow bypassing of two factor authentication for workgroup
#'
#' @description More information on two factor authentication can be found in
#' `vignette("faqs")`.
#'
#' @param workgroup_uuid Workgroup UUID
#' @param allow_bypass Logical to indicate whether the workgroup should allow
#' selected participants to bypass two step workspace verification.
Expand Down Expand Up @@ -32,14 +35,16 @@ allow_bypass_2fa <- function(workgroup_uuid,

#' Allow/disallow bypassing of two factor authentication for participant
#'
#' @description Note that this setting can only be updated by a workspace owner.
#' More information on two factor authentication can be found in
#' `vignette("faqs")`.
#'
#' @param participant_uuid Participant UUID (note that this is different to the
#' user UUID)
#' @param allow_bypass Logical to indicate whether the participant should be
#' able to bypass two step verification for workspace.
#' @inheritParams objectiveR
#'
#' @details Note: This setting can only be updated by a workspace owner.
#'
#' @export

participant_bypass_2fa <- function(participant_uuid,
Expand Down
3 changes: 2 additions & 1 deletion man/allow_bypass_2fa.Rd

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

7 changes: 3 additions & 4 deletions man/participant_bypass_2fa.Rd

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

2 changes: 2 additions & 0 deletions vignettes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.html
*.R
29 changes: 29 additions & 0 deletions vignettes/faqs.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "Frequently Asked Questions"
output: rmarkdown::html_vignette
vignette: >
%\VignetteIndexEntry{Frequently Asked Questions}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
---

## What is the difference between users and participants?

A user is an individual using Objective Connect. A participant is a user in a particular workspace. For example, a person using Objective Connect will have a User UUID associated with them, and also a Participant UUID for each individual workspace they are a member of.

A user can get their User UUID by running `my_user_id()`. A user can find their participant UUID for a particular workspace using `participants()`.


## How does two factor authentication (2FA) work?

(Note: this is sometimes also referred to as 'two step verification'.)

Where workspaces have 2FA enabled, users cannot use the API unless they have been given permission to bypass this. Permission to bypass 2FA is given at a workspace level, and can only be granted by the workspace owner.

Firstly, permission must be given at a workgroup level to allow bypassing permissions to be granted for workspaces within it. This can be done using `allow_bypass_2fa()`.

Once this has been allowed, bypassing can be granted for individual participants in a workspace using `participant_bypass_2fa()`.

Both of these functions also allow for bypassing to be disallowed using `allow_bypass = FALSE`.

To check the status of bypassing 2FA for participants in a workspace, use `participants()`.

0 comments on commit cc65c57

Please sign in to comment.