# NOT RUN {
# This is the example from crunchyBody(), adding these alternate bodies:
shinyUI(fluidPage(
tags$head(
# This is content that will always be rendered
tags$title("My secure app")
),
crunchyBody(
# This is content that only is rendered if the user is authorized
fluidRow(
column(6, h1("Column 1")),
column(6, h1("Column 2"))
)
),
crunchyPublicBody(
# This is shown to visitors who are not logged into Crunch at all
h1("Please log into Crunch.")
),
crunchyUnauthorizedBody(
# This is for Crunch users who don't meet your authorization criteria
# Perhaps they don't have access to a particular dataset
h1("You don't have access to this app."),
tags$div("Contact your_admin@example.com.")
)
))
# }
Run the code above in your browser using DataLab