Description Usage Arguments Value Examples
Call this to set an expression or server function to evaluate to determine whether the current user is authorized to access your app. Ideally, this is cheap to execute because it will be called repeatedly.
1 | setCrunchyAuthorization(func)
|
func |
A |
Invisibly, the server function. This function is called
for the side effect of setting the authorization function globally. The
function should return TRUE
if the current user is authorized.
1 2 3 4 | setCrunchyAuthorization(function (input, output, session) {
# Restrict to users who have crunch.io emails
endsWith(email(shinyUser()()), "@crunch.io")
})
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.