whitelist: Whitelist check

Description Usage Arguments Value Examples

Description

After a user logs in, check to see if they are on a whitelist

Usage

1
whitelist(user_info, whitelist = NULL)

Arguments

user_info

the object returned by get_user_info

whitelist

A character vector of emails on whitelist

Value

TRUE if on whitelist or no whitelist, FALSE if not

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
## Not run: 
options(googleAuthR.scopes.selected = 
   c("https://www.googleapis.com/auth/userinfo.email",
     "https://www.googleapis.com/auth/userinfo.profile"))
                                        
googleAuthR::gar_auth()

## default is user logged in
user <- get_user_info()

the_list <- whitelist(user, c("your@email.com", 
                              "another@email.com", 
                              "yet@anotheremail.com"))

if(the_list){
  message("You are on the list.")
} else {
  message("If you're not on the list, you're not getting in.")
}




## End(Not run)

nephantes/debrowser_bioconductor_release documentation built on May 29, 2019, 7:15 a.m.