crunchyBody: A Shiny UI with Crunch auth

Description Usage Arguments Details Value See Also Examples

Description

When using crunchyServer() to wrap your app in Crunch authentication and authorization, you need to wrap your UI body content inside crunchyBody().

Usage

1

Arguments

...

UI elements for your app

Details

This is the part that is conditionally rendered if the user is allowed. Any UI elements you want always to show, including <head> tags, should go outside this function.

Value

A uiOutput() container into which crunchyServer() will conditionally render output.

See Also

crunchyPublicBody() crunchyServer()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
## Not run: 
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"))
        )
    )
))

## End(Not run)

Example output

Loading required package: crunch

Attaching package: 'crunch'

The following objects are masked from 'package:stats':

    rstandard, setNames

The following object is masked from 'package:graphics':

    title

The following object is masked from 'package:utils':

    write.csv

The following object is masked from 'package:base':

    table

Loading required package: shiny

Attaching package: 'shiny'

The following object is masked from 'package:crunch':

    icon


Attaching package: 'crunchy'

The following object is masked from 'package:crunch':

    makeArrayGadget

<div class="form-group shiny-input-container" style="display: none;">
  <input id="token" type="text" class="form-control" value=""/>
</div>
<div class="container-fluid">
  <div id="crunch_body" class="shiny-html-output"></div>
</div>

crunchy documentation built on Jan. 16, 2021, 5:17 p.m.