Add nested where clause to filter based on related tables

This commit is contained in:
Vikram Rangnekar
2019-11-04 23:44:42 -05:00
parent 77a51924a7
commit 89bc93e159
13 changed files with 358 additions and 206 deletions

View File

@ -51,7 +51,8 @@ auth:
cookie: _{{app_name_slug}}_session
# Comment this out if you want to disable setting
# the user_id via a header. Good for testing
# the user_id via a header for testing.
# Disable in production
creds_in_header: true
rails:
@ -92,6 +93,10 @@ database:
#max_retries: 0
#log_level: "debug"
# Set session variable "user.id" to the user id
# Enable this if you need the user id in triggers, etc
set_user_id: false
# Define variables here that you want to use in filters
# sub-queries must be wrapped in ()
variables:
@ -131,7 +136,7 @@ tables:
name: me
table: users
roles_query: "SELECT * FROM users as usr WHERE id = $user_id"
roles_query: "SELECT * FROM users WHERE id = $user_id"
roles:
- name: anon

View File

@ -84,4 +84,8 @@ database:
password: ''
#pool_size: 10
#max_retries: 0
#log_level: "debug"
#log_level: "debug"
# Set session variable "user.id" to the user id
# Enable this if you need the user id in triggers, etc
set_user_id: false