setCrunchyAuthorization {crunchy} | R Documentation |
Register authorization logic for your Crunchy app
Description
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.
Usage
setCrunchyAuthorization(func)
Arguments
func |
A |
Value
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.
Examples
setCrunchyAuthorization(function (input, output, session) {
# Restrict to users who have crunch.io emails
endsWith(email(shinyUser()()), "@crunch.io")
})
[Package crunchy version 0.3.3 Index]