Juicebox
Preparing your dataStory DesignerVisual design tips
  • Juicebox Documentation
  • What is Juicebox?
    • Technology requirements
  • Getting Started
    • Getting a Workspace
    • Reach out to us
  • Building Reports
    • Creating and Editing Reports
    • Data
      • Loading data
      • Managing data
      • The data preview
    • Design
      • Slices
        • Dynamic text
        • Customizing what shows
        • Multiple data tables
        • Charts
          • Headline
          • Filters
          • Chooser
          • Table
          • Card
          • Reports Navigation
          • Bar
          • Scatterplot
          • Leaderboard
          • Map
          • Trend
          • Pie
        • Selections as Variables
        • Debug
      • Ingredients
        • The ingredient editor
          • The dimension ingredient editor
          • The measure ingredient editor
        • Adding new ingredients
        • Advanced field formulas
        • Time formats
        • Number formats
    • Share
      • Publishing a report (or report changes)
      • Inviting viewers
      • Insights
    • Tips and Tricks
      • Telling data stories
      • Visual design
      • Preparing your data
      • Useful resources
  • Viewing Reports
    • Signing In
    • Navigating Reports
    • Focus and Filter
  • Managing Users
    • Adding Users
    • User Roles and Management
    • Limiting what data users can see
    • Access Views
    • Embedding Juicebox Apps
      • How embedding works
      • Juicebox Embedding API
      • Juicebox API
    • Requesting data from embedded apps
  • Managing my workspace
    • Workspace Settings
    • Subscription and Billing
  • Changelog 🎁
Powered by GitBook
On this page
  • Examples of data permissions
  • Making data permissions affect all apps
  • Making data permissions that affect individual apps

Was this helpful?

Export as PDF
  1. Managing Users

Limiting what data users can see

Juicebox apps have integrated data permissions.

Data permissions objects create filters that are applied to every database query. If the database table does not contain the column or ingredient referenced, the data permission will be ignored.

Data permission objects reference ingredients which are named expressions that can use more than one database column. Data permission objects will soon be able to reference raw table columns by surrounding the column name with square bracket.

  • ingredient: [list of values] Show only rows where the ingredient expression evaluates to one of the list of values.

Soon, Juicebox will also support accessing raw column values like this

[column]: [list of values]Show only rows where the database column is in the list of values.

For all the following examples an [column] can be used in any place where an ingredientis used.

  • ingredient__notin: [list of values] Show only rows where the ingredient expression does not contain a value in the list of values.

  • ingredient__eq: value Show only rows where the ingredient expression is equal to a value.

  • ingredient__ne: value Show only rows where the ingredient expression is not equal to a value.

  • ingredient__like: value Show only rows where the ingredient expression is like the value expression. Use % to represent wildcards.

  • ingredient__gt: value Show only rows where the ingredient expression is greater than a value.

    • You can use lt, lte, gt and gte for less than, less than or equal, greater than or greater than or equal respectively.

  • ingredient__between: [value1, value2] Show only rows where the ingredient expression is between value1 and value2

Examples of data permissions

{ 
  "state": ["New Hampshire", "Vermont", "Maine", "Massachusetts"], 
  "age__gt": 30 
}

This user can only see rows where the state ingredient is in the list of four states AND the age ingredient is greater than 30.

{
  "[Student Name]": "Maria Hill",
  "[Organization]": 101
}

This user can see rows where the database table contains a column named “Student Name” which is equal to “Maria Hill” and the column named “Organization” is equal to 101.

Making data permissions affect all apps

{
   automatic_filters: {Data Permission Object}
}

Making data permissions that affect individual apps

{
   app_filters: {
     {app_slug}: {Data Permission Object}
     {app_slug2}: {Data Permission Object}
   }
}

PreviousUser Roles and ManagementNextAccess Views

Last updated 1 month ago

Was this helpful?